Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
I have a table that is in the general structure of the table below - each booking has multiple itinerary lines. My problem is that I need the pax calculation to work, regardless of the filters I apply to the page.
I originally was using the Countrows1 custom column which counted how many times the booking appears, so in this instance the pax would be the sum of pax divided by the countrows (8 / 4 = 2).
Countrows1 = CALCULATE(COUNT(Bookings,BookId),ALLEXCEPT(Bookings,BookId))
Pax1 = SUMX(Bookings, Pax / Countrows1)
The problem is that this doesn't work when I need to filter by country. So in this instance, if I filtered to Mozambique, it shows 0.5 pax (2 / 4 = 1.5).
I then tried adding another column, Countrows2, so that it counts the number of rows per booking per country.
Countrows2 = CALCULATE(COUNTROWS(Bookings),FILTER(Bookings,[BookId] = EARLIEST(Bookings[BookId])),FILTER(Bookings,[Country]=EARLIEST(Bookings,[Country])))
Pax2 = SUMX(Bookings, Pax / Countrows2)
The problem here is that it works as long as you filter the country to either Mozambique or Zimbabwe, but if you don't apply that filter, the total pax is 4.
Is there a way of calculating the pax so that it calculates correctly & duplicates / deduplicates when needed, whether or not I apply a country filter to the report?
Thanks!
Solved! Go to Solution.
Hi, thanks so much for your help, but that wasn't quite what I was looking for.
I actually ended up finding the solution here (using the SUMMARIZE function): Solved: Re: Calculate sum without considering the duplicat... - Microsoft Fabric Community
@Kitty-SD Having a bit of trouble following this but looks like a measure totals issue. First, please vote for this idea: https://ideas.powerbi.com/ideas/idea/?ideaid=082203f1-594f-4ba7-ac87-bb91096c742e
This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376
Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907
Also: https://youtu.be/uXRriTN0cfY
And: https://youtu.be/n4TYhF2ARe8
Hi, thanks so much for your help, but that wasn't quite what I was looking for.
I actually ended up finding the solution here (using the SUMMARIZE function): Solved: Re: Calculate sum without considering the duplicat... - Microsoft Fabric Community
Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!
Check out the October 2025 Power BI update to learn about new features.