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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
TaroGulati
Helper III
Helper III

Hierarchy level sum

Hi all, 

 

I am trying to do the sum from fact tables based on the different hierarchy level selected from the dimension. In the below screen on the left I have a dimension table and on the right there is fact table: 

 

TaroGulati_0-1743756450271.png

When in a matrix visual if category from dimension is in scope i want to show the sum of amount category from fact table, if sub category is inscope then sum of amount sub category. I tried it using isinscope function but not working. 

 

In the attachment, PBIX file. 

 

Thanks

 

https://onedrive.live.com/?id=93E25D0F6AEA0183%21sb6c219f638834e3cb461a148dd6e3c69&cid=93E25D0F6AEA0... 

 

 

https://1drv.ms/u/c/93e25d0f6aea0183/ERs4PnNxej1LrrXanT3xsD8BuV23PmgGGCd5FODpZForTw?e=9gqOd4 

1 ACCEPTED SOLUTION
SamWiseOwl
Super User
Super User

Hi @TaroGulati 

You need to use ISINSCOPE on the bottom layer not the top layer.

Amount =

IF(
    ISINSCOPE('Dimension'[Sub-category] )
    ,sum('Fact'[Amount Sub category])
    ,sum('Fact'[Amount Category])
    )
 
SamWiseOwl_0-1743776741719.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

View solution in original post

1 REPLY 1
SamWiseOwl
Super User
Super User

Hi @TaroGulati 

You need to use ISINSCOPE on the bottom layer not the top layer.

Amount =

IF(
    ISINSCOPE('Dimension'[Sub-category] )
    ,sum('Fact'[Amount Sub category])
    ,sum('Fact'[Amount Category])
    )
 
SamWiseOwl_0-1743776741719.png

 


If you are happy with this answer please mark as a solution for others to find !

Kudos are always appreciated! Check out our free Power BI video courses.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.

Top Solution Authors
Top Kudoed Authors