% not calculating correctly (based on filter)

I’m sure I’m doing a simple mistake, but solving this has been a bit difficult. As you can see, the percentages are clearly not calculating correctly. I’ve tried filtering the % column to be only “Domestic” value, but have not been able to make it work. Here is the .PBIX file: Airfair data.pbix (1.2 MB)

image

Hello @mdalton2100,

Thank You for posting your query onto the Forum.

To achieve the correct percentage values. Below is the formula as well as screenshot of the results provided for the reference -

% of APC 14 day split (all types)_a2 - Harsh = 
DIVIDE( [Count of Domestic tickets a2] , 
    CALCULATE( [Count of Domestic tickets a2] , ALL('Air Travel v2'[Advance Purch _ 14 day flag] ) ) )

Results

I’m also attaching the working of the PBIX file for the reference.

Hoping you find this useful and meets your requirements that you’ve been looking for. :slightly_smiling_face:

Thanks and Warm Regards,
Harsh

Airfair data - Harsh.pbix (1.2 MB)

Thank you Harsh, works beautifully. Appreciate the education on DAX.

Hello @mdalton2100,

You’re Welcome. :slightly_smiling_face:

I’m glad that I was able to assist you and you found the solution helpful in your scenario.

Thanks and Warm Regards,
Harsh

1 Like