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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Fix subtotal and total measure evaluated in differente levels of Hierarchy

 

Good morning 

 

I would really appreciate your help with this request: 

Context:

I currently have a matrix within 3 levels in the rows and some measures 

Rows :

Bank name (Category 1)  

Account Type (Category 2)

Account Name ( Catgory 3) 

 

What I need is to create a measure who evaluates the account type taking into account there are 2 options, and return an specific calculation different for each one. This last request i just solved it using Measure 1. 

However, when I try to get the subtotals for Category 1 and  the grand total, i just have not figured out how, because it must be sum of the results of evaluating the type of account,  I mean the sum of the subtotals I got from Category 2 

 

Table : Account Type

codname
1COR
2AHO

For identify wich type an account is, I used the code  from the table above 

 

Measure 1 : 

VAR COR= [Measure23]-[Measure44]+[Measure45]
VAR AHO= [Measure22]-[Measure44]+[Measure45]
VAR AT = SUM(Account_Type_code)
RETURN
SWITCH ( Account_Type,
1,COR,2,AHO,3,"")

 

Davidsagi_0-1637597754344.png

Here I need to get the right value that would be  the sum of 26.498.449.893+7.430.738.545.94 , this per category and grand total. 

Thanks. 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

At the end, I use SUMMARIZE for creating a virtual table, within a new column where the condition were applied, the use SUMX in order to get the value I needed . 

🙂 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

At the end, I use SUMMARIZE for creating a virtual table, within a new column where the condition were applied, the use SUMX in order to get the value I needed . 

🙂 

amitchandak
Super User
Super User

@Anonymous , I think you need to use isinscope for that

 

if(isinscope (Table[Account Type]), [Measure1], [Measure2])

 

https://xxlbi.com/blog/new-dax-function-isinscope/

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Morning,

 

Thanks for your answer, isinscope coulw work too, but that part is already working in my modelo. the one I need is for the subtotal per category 1 that should return the result of evaluating the measure 1 +  result of evaluating the measure 2. 

 

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.