Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi Guys,
My data structure is made up of a fact table and several dimensions that join to it, see diagram below. The problem comes when I'm trying to create a dynamic total of the Order Value field in the Order Detail table, that takes into account any filters that might be applied to the Calendar and the Branch table. In other words I need a total Order Value calculated from my fact table but I want it NOT to ignore ANY filters applied to those tables. I know you can't do an ALLEXCEPT on a whole table, but I also can't anticipate which fields my users might use from these dimensions therefore I can't list them all individually in multiple ALLEXCEPT-s. So this is where I'm getting stuck.
I thought the below would work:
Any suggestions on what I'm doing wrong?
Hope this all made sense.
Thank you
Solved! Go to Solution.
Hi Rico,
I managed to figure out how to make it work, just for reference this is what I was after:
Hi @Anonymous
I build a sample to have a test by your measure.
Dynamic Total =
CALCULATE (
SUM ( 'Order Detail Measures'[Order Value] ),
ALLEXCEPT ( 'Calendar Date', 'Calendar Date'[Calendar ID] ),
ALLEXCEPT ( 'Booking Branch', 'Booking Branch'[Booking Branch Key] )
)
My sample:
Your Measure with Allexcept function only contains Calendar ID Field in Calendar Date and Booking Branch key Field in Booking Branch. So this measure could only be impact when we filter Calendar ID Field or Branch key Field. (I use the filter levels on this page ).
EX: When you filter Calendar Date Table by Calendar Date Field or Company Field, the result won't be impact and still show sum all.
So I think you can add Specific Fields you want to impact this measure in ALLEXPECT Function.
EX:
Dynamic Total =
CALCULATE (
SUM ( 'Order Detail Measures'[Order Value] ),
ALLEXCEPT ( 'Calendar Date', 'Calendar Date'[Calendar ID], 'Calendar Date'[Calendar Company]),
ALLEXCEPT ( 'Booking Branch', 'Booking Branch'[Booking Branch Key] )
)
Or IF you want All fileds in Calendar Date Table and Booking Branch Table can filter this Measure.
You can use sum without allexcept function.
EX:
Measure 2 = sum('Order Detail Measures'[Order Value])
IF you want most fields can filter this Measure, and only a little bit fiels can't impact this measure.
Ex: Calendar ID and company can filter this measure and Date can't. You may try all function.
Dynamic Total =
CALCULATE (
SUM ( 'Order Detail Measures'[Order Value] ),
ALL('Calendar Date'[Calendar Date]),
ALLEXCEPT ( 'Booking Branch', 'Booking Branch'[Booking Branch Key] )
)
I think this blog Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT may help you to understand allxxx function in power bi.
You can download the pbix file from this link: Dynamic total filtering on 2 dimensions
Best Regards,
Rico Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Hi Rico,
I managed to figure out how to make it work, just for reference this is what I was after:
Hi Rico,
Thank you for your detailed answer!
Unfortunately the functionality I'm after is none of these scenarios.
The below measure you're proposing for allowing filtering on both Branch and Calendar will not give me what I want, it'll just sum the Order Value up like a base measure.
sum('Order Detail Measures'[Order Value])
Let's suppose the total Order Value for 2019 is £5m and for 2020 it's £2m, what I want is my calculation to always return £5m or £2m but not only when the person selects the Year field in the calendar, but using any of the other fields. But I don't want any of the other dimension tables to affect it.
I don't think ALL or ALLEXCEPT is able to do what I'm after on its own. I will try and see if I can get to what I need using a Group by instead.
Thank you
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!