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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
nj-matt
Helper I
Helper I

Return value in matrix visual only for lowest level of hierarchy

I have a dataset that looks like this -->

 

CategoryBrandSKU COGS 
Candy BarsChocolate King6oz $      1.50
Candy BarsChocolate King10oz $      2.00
Candy BarsCrunchie Bar8oz $      1.85
GumChewy GumFruit Flavored $      0.50
GumChewy GumMint Flavored $      0.65

 

When returning the value for Cogs, I only want to display the value for the SKU level.

 

So in the matrix visual, right now it looks like this (using AVERAGE Dax formula) -->

 

nj-matt_0-1617124813615.png

 

Instead I only want this -->

 

nj-matt_1-1617124887544.png

 

Help?

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@nj-matt , you can use isinscope and make the value blank when SKU is not in scope

 

example  measure, where COGS is a measure too

if(not(isinscope(Table[SKU])), blank(), [COGS])

Refer this blog

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

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@nj-matt , you can use isinscope and make the value blank when SKU is not in scope

 

example  measure, where COGS is a measure too

if(not(isinscope(Table[SKU])), blank(), [COGS])

Refer this blog

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

That did it, thanks!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.