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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

sum of the remaining

Hi, I'm new in Power BI and wondering to present the result in decomposition tree. 

I have a list of data 

Timestamp

type

value

6/6/22

a

50
7/6/22b70
8/6/22c80
4/6/22d90
3/6/22e40

 

And the sum of those are 400, but the sum from the table is 330. 

I use 

Remaining = sum('Total'[Value])-sum('Type'[Value])
 
How should I input this remaining value inside my decomposition tree?
The decomposition tree is total>type and remaining > a,b,c,d,e
 
Thanks for your help 
2 ACCEPTED SOLUTIONS
selinaz
Resolver II
Resolver II

Hi @Anonymous,

 

Do you want this result?

selinaz_0-1660200341803.png

 

please try this measure:

 

val = IF(HASONEVALUE('Table'[type]),SELECTEDVALUE('Table'[value]),'Table'[remaining])

 

 

and change the name of total:

selinaz_0-1660200556712.png

 

you can get you want.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Best regards.

View solution in original post

Ethan96
Resolver I
Resolver I

Hi, @Anonymous 

You need to complete Table 'categories list' with the following data.

Ethan96_4-1660206120252.png

Calculated column:

Category = IF('category list'[SubCategory]="remaining","remaining","Type")
Total= 
var a= RELATED('Type'[value])
return IF(ISBLANK(a),SUM(Total[Value])-SUM('Type'[value]),a)

Ethan96_3-1660205883541.png

sample pbix

 

Regards,

Ethan

View solution in original post

7 REPLIES 7
Ethan96
Resolver I
Resolver I

Hi, @Anonymous 

You need to complete Table 'categories list' with the following data.

Ethan96_4-1660206120252.png

Calculated column:

Category = IF('category list'[SubCategory]="remaining","remaining","Type")
Total= 
var a= RELATED('Type'[value])
return IF(ISBLANK(a),SUM(Total[Value])-SUM('Type'[value]),a)

Ethan96_3-1660205883541.png

sample pbix

 

Regards,

Ethan

selinaz
Resolver II
Resolver II

Hi @Anonymous,

 

Do you want this result?

selinaz_0-1660200341803.png

 

please try this measure:

 

val = IF(HASONEVALUE('Table'[type]),SELECTEDVALUE('Table'[value]),'Table'[remaining])

 

 

and change the name of total:

selinaz_0-1660200556712.png

 

you can get you want.

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

Best regards.

Greg_Deckler
Community Champion
Community Champion

@Anonymous This looks like a measure totals problem. Very common. See my post about it here: https://community.powerbi.com/t5/DAX-Commands-and-Tips/Dealing-with-Measure-Totals/td-p/63376

Also, this Quick Measure, Measure Totals, The Final Word should get you what you need:
https://community.powerbi.com/t5/Quick-Measures-Gallery/Measure-Totals-The-Final-Word/m-p/547907



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi @Greg_Deckler , 

There something different. I want to use dax to get the remaining value 70 and put that value into the remaining column so that the time I perform decomposition tree there will be 330 and 70 from the total. 

 

How should I do that? 

Thanks for your help. 

 

@Anonymous Where does the 400 come from?

 



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

I have two set of value; one is the total 400 and one is the list of value which equal to 330.  And I use the remaining=total-list of value.

So I willing to get a decomposition tree that 330 and 70. 

I have a category list table 

a
b
c
d
e
remaining

 

But I don't know how to let the remaining value input to the table value there. 

 

Thanks for your help. 

Anonymous
Not applicable

Hi @Greg_Deckler ,

I have two set of value; one is the total 400 and one is the list of value which equal to 330.  And I use the remaining=total-list of value.

So I willing to get a decomposition tree that 330 and 70. 

I have a category list table 

a
b
c
d
e
remaining

 

But I don't know how to let the remaining value input to the table value there. 

 

Thanks for your help. 

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.