Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
ChaiAndDax
New Member

Dynamic slicer order affecting calculation logic in matrix visual

I’m working on a Power BI report where I have a field parameter that switches between multiple dimension tables. These dimensions all connect to the same fact table.

Here’s the setup:

  • The field parameter is used both as a slicer and as the row field in a matrix visual.

  • When a user selects a dimension (say “Category”), the matrix shows measures broken down by that category with totals.

  • Switching to another dimension (e.g., “Region”) changes the breakdown accordingly.

  • If multiple dimensions are selected, they behave like a hierarchy in the matrix.

The challenge:
The calculation for my measure needs to behave differently depending on the order in which the user selects the dimensions.

  • If the first selection is “Category” and then “Region” (or any others), everything is calculated normally.

  • But if the first selection is “Region” and then “Category,” I need to exclude certain categories from the calculation.

Has anyone tackled logic in Power BI where the measure needs to know the sequence of dimension selection in a field parameter/matrix combination? Any creative DAX or design ideas?

4 REPLIES 4
v-nmadadi-msft
Community Support
Community Support

Hi @ChaiAndDax 

May I check if this issue has been resolved? If not, Please feel free to contact us if you have any further questions.


Thank you

v-nmadadi-msft
Community Support
Community Support

Hi @ChaiAndDax 

I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions.


Thank you.

danextian
Super User
Super User

Hi @ChaiAndDax 

This question has come up many times, but the answer is still no. The order of values in a column is determined by their default sort order or by another column, not by the order in which the values were selected.

 





Dane Belarmino | Microsoft MVP | Proud to be a Super User!

Did I answer your question? Mark my post as a solution!


"Tell me and I’ll forget; show me and I may remember; involve me and I’ll understand."
Need Power BI consultation, get in touch with me on LinkedIn or hire me on UpWork.
Learn with me on YouTube @DAXJutsu or follow my page on Facebook @DAXJutsuPBI.
MohamedFowzan1
Responsive Resident
Responsive Resident

Hi @ChaiAndDax 


Power BI does not natively capture or expose the exact order in which users select multiple fields in a field parameter slicer

The only related DAX that can be used is:

ISINSCOPE-based logic: If you want calculation logic to change depending on which level (dimension) is “on top” in the matrix, build hierarchical IF/ISINSCOPE logic based on known level order, but this requires you to know the intended hierarchy up front.

It wouldn't exactly act dynamic, the DAX can only determine which are in scope, not which was chosen first

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.