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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
Sanjay_Shah
New Member

Identify the level of a Flat hierarchy in a matrix

Friends :

 

I am having problems in identifying the level at which the matrix has been expanded. I have tried isfiltered, hasonevalue, distinctcount etc.. but noting seems to work. What i have observed is that if the lower levels of hierarchy have more than 1 values, the above functions work properly, but if the lower levels have only 1 value, the functions return incorrect value. Please see the screenshot below :

Sanjay_Shah_0-1716355065891.png

 

For the first value the lower levels has only 1 value in the hierarchy so in the first row the values are coming for filt_csm, filt_rsm even though the matrix is at level 1. this happens even if the matrix is collapsed at level 1.

 

Does anyone have an accurate solution to identify at which level in the matrix I am using dax, so that i can show different measures at different levels.

 

Sanjay Shah

1 ACCEPTED SOLUTION
danextian
Super User
Super User

Hi @Sanjay_Shah 

ISINSCOPE returns true when the specified column is the level in a hierarchy of levels





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.

View solution in original post

3 REPLIES 3
danextian
Super User
Super User

Hi @Sanjay_Shah 

ISINSCOPE returns true when the specified column is the level in a hierarchy of levels





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.

yes, isinscope resolved the issue. thanks a ton.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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