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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.