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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

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.


@ 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!:
Mastering Power BI 2nd Edition

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

@ 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!:
Mastering Power BI 2nd Edition

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.

@ 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!:
Mastering Power BI 2nd Edition

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.


@ 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!:
Mastering Power BI 2nd Edition

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.

@ 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!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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