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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Calculate share % of next hierarchy level e.g. in matrix (dynamically)

Dear PBI community,

 

I am facing a topic where I want to calculate the share of an item compared to the next level of a hierarchy e.g. in a matrix visual. Let's say we have a country then region and then cities. What I want to achieve is to write a measure that detects the level at which I am currently at w/o specifying the column in the REMOVEFILTERS or ALL function. I need this because we are building reports with different combination of attributes and I do not want to write serveral measures where I have to put in all the explicit column definitions. for each combination. What I want to achieve looks like this:

 

REMOVEFILTERS ( <the level which is filtered by the current row in matrix> )

 

Is there any way to implemented this with DAX?

 

Cheers and thanks in advance 

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , I think isinscope can help

refer example https://www.kasperonbi.com/use-isinscope-to-get-the-right-hierarchy-level-in-dax/

IsInScope - Switch Rank at different levels: https://youtu.be/kh0gezKICEM

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
November Fabric Update Carousel

Fabric Monthly Update - November 2025

Check out the November 2025 Fabric update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Users online (27)