Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Probably a really easy question but I can't seem to figure it out.
My data source looks like this.
TABLE1
ID | SITE | CUSTOMER | ITEM | SPEND |
1 | 1 | A | item1 | 10 |
... | ... | ... | ... | ... |
I've made a visual in my report that looks like this:
CUSTOMER | SUM OF SPEND |
A | 40 |
B | 20 |
C | 100 |
D | 50 |
E | 220 |
I am trying to write a measure that returns the maximum spend based overall customers. So I want my output to be this.
CUSTOMER | SUM OF SPEND | MAX SPEND |
A | 40 | 220 |
B | 20 | 220 |
C | 100 | 220 |
D | 50 | 220 |
E | 220 | 220 |
I tried to do CALCULATE(MAX('TABLE1'[SPEND]), ALLSELECTED('TABLE1')) but this returns the highest spend line from TABLE1 not the highest sum of spend line from the visual like I want.
Anyone able to help me please?
Thank you.
Solved! Go to Solution.
Hi @Anonymous ,
Try this:
Measure = MAXX( SUMMARIZE( ALLSELECTED(Table1) , Table1[Customer] , "Value" , SUM(Table[Spend]) ) [Value] )
Hi @Anonymous ,
Try this:
Measure = MAXX( SUMMARIZE( ALLSELECTED(Table1) , Table1[Customer] , "Value" , SUM(Table[Spend]) ) [Value] )
Worked perfectly thank you. I forgot the SUMMARIZE function.
Check out the July 2025 Power BI update to learn about new features.
User | Count |
---|---|
72 | |
72 | |
38 | |
30 | |
26 |
User | Count |
---|---|
99 | |
87 | |
45 | |
43 | |
35 |