cancel
Showing results for
Did you mean:

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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:

 User Amount Group A 10 1 B 12 1 C 14 2 C 12 2 B 22 1 A 234 1 D 24 2 D 2 2 C 7 1

But looing to create a chart visual as follows:

 User Amount Group Group Total A 10 1 285 B 12 1 285 C 14 2 52 C 12 2 52 B 22 1 285 A 234 1 285 D 24 2 52 D 2 2 52 C 7 1 285

Not sure what to search for but appreciate any help.

Thanks

1 ACCEPTED SOLUTION
Super User

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.

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
7 REPLIES 7
Community Support

Hi @NiugeS ,

``````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])``

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

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Helper V

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

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

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Helper V

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

Super User

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.

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...
Super User
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.

Become an expert!: Enterprise DNA
External Tools: MSHGQM
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...