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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
NiugeS
Helper V
Helper V

Total of all child values

Hi all,

 

New to Power BI and struggling with something probably quite easy.  I have imported data from an excel as follows:

UserAmountGroup
A101
B121
C142
C122
B221
A2341
D242
D22
C7

1

 

But looing to create a chart visual as follows:

 

UserAmountGroupGroup Total
A101285
B121285
C14252
C12252
B221285
A2341285
D24252
D2252
C71285

 

Not sure what to search for but appreciate any help.


Thanks

1 ACCEPTED SOLUTION

OK, I literally spent 10 times longer looking for that post rather than just doing this:


Measure =
VAR __Group = MAX('Table'[Group])
RETURN
SUMX(FILTER(ALL('Table'),'Table'[Group] = __Group),'Table'[Amount])

 

PBIX is attached. Sorry, next time instead of trying to refer you to a similar issue, I'll just solve the thing! 🙂  PBIX is attached below.



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

7 REPLIES 7
v-xuding-msft
Community Support
Community Support

Hi @NiugeS ,

Please try this:

Measure = 
CALCULATE (
    SUM ( 'Table'[Amount] ),
    FILTER ( ALL ( 'Table' ), 'Table'[Group] = MAX ( 'Table'[Group] ) )
)

If you also need to show the total value, please try this:

Total Measure = SUMX('Table',[Measure])

 4.PNG

Best Regards,

Xue Ding

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

Best Regards,
Xue Ding
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Greg_Deckler
Super User
Super User

Huh, I literally just answered a very similar question. See if this thread helps, last post of mine:
https://community.powerbi.com/t5/Desktop/how-to-check-for-ID-s-with-change-in-status-category-from-l...


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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Thanks - just downloaded the pbix file from the other post and trying to work it out.  Thanks.

Sure, @NiugeS let me know if you need further assistance but figured that was the fastest way to help out.


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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Thanks @Greg_Deckler  - i can't say I follow .. sorry, new to Dax but trying to figure it out.  Not sure if negative numbers are causing issues either but will try and figrue it out.. thank you

OK, I literally spent 10 times longer looking for that post rather than just doing this:


Measure =
VAR __Group = MAX('Table'[Group])
RETURN
SUMX(FILTER(ALL('Table'),'Table'[Group] = __Group),'Table'[Amount])

 

PBIX is attached. Sorry, next time instead of trying to refer you to a similar issue, I'll just solve the thing! 🙂  PBIX is attached below.



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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Well first, it would help if I sent you to the correct thread: https://community.powerbi.com/t5/Desktop/Use-slicer-to-filter-by-another-column/m-p/1025543

Hang tight, I'll try to whip up a PBIX for you.


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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.