Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreNext up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now
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
Solved! Go to 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.
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])
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.
Thanks - just downloaded the pbix file from the other post and trying to work it out. Thanks.
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.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 47 | |
| 44 | |
| 40 | |
| 18 | |
| 18 |
| User | Count |
|---|---|
| 71 | |
| 66 | |
| 33 | |
| 32 | |
| 32 |