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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

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