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
mm14222
Helper I
Helper I

How to Change Measure depend on the level of hierarchy or drill down

I have a table with 4 Drill down levels, i added in Rows 

Layer1

Layer2

Layer3 (should only be available for channels that has value)

 

Capture.PNG

 In Layer3, some has values while others dont, and this is causing to have the measures repeating as per this screenshot.

I would like to be able to detect the Layer3 and if it is for example Affiliates, then it provide 0 for any measure that doesnt have value.

Your kind support is highly appreicated.

2 REPLIES 2
Shahid12523
Kudo Kingpin
Kudo Kingpin

 Switching Measures by Hierarchy Level in Power BI? Yes, it’s Possible!

If you’ve built reports in Power BI, you’ve likely seen the matrix visual show the same measure across all levels of a hierarchy. 📊 But what if your users need different insights at different depths?

Let’s say:
👥 At the top level (Department), users want to see Total Headcount
🧑‍🤝‍🧑 But when they drill into Gender, they want to see % Share instead

💡 That’s where scope-aware DAX comes in!
Detect the current level in the hierarchy
Switch the measure based on scope
Apply dynamic formatting — numbers at higher levels, percentages at deeper levels

It’s a game-changer for visuals that tell different stories depending on how far users explore — ideal for:

Workforce headcount with gender mix
Inventory vs turnover
Revenue vs conversion rate

switch.jpg

Shahed Shaikh
amitchandak
Super User
Super User

@mm14222 , isinscope should able to help

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

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
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.