The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I would like to get the MAX of a SUM grouped by some columns, something like:
MAX of (SUM of amount GROUP BY column a, column b)
so the MAX should be related not the single amounts but to the sum of the amounts grouped by column a, column b.
Thanks,
Andrea
Solved! Go to Solution.
Hi @arimoldi,
You could solve your problem with a measure below.
The 1st step is to create a summarized table, the 2nd one - apply MAXX to it.
In plain text:
Max of Sums =
VAR _tbl = SUMMARIZE ( Data, [Name], [Month], "Sum of Values", CALCULATE ( SUM (Data[Value] ) ) )
RETURN MAXX ( _tbl, [Sum of Values] )
Best Regards,
Alexander
Hi @arimoldi,
You could solve your problem with a measure below.
The 1st step is to create a summarized table, the 2nd one - apply MAXX to it.
In plain text:
Max of Sums =
VAR _tbl = SUMMARIZE ( Data, [Name], [Month], "Sum of Values", CALCULATE ( SUM (Data[Value] ) ) )
RETURN MAXX ( _tbl, [Sum of Values] )
Best Regards,
Alexander
User | Count |
---|---|
77 | |
77 | |
36 | |
30 | |
28 |
User | Count |
---|---|
106 | |
97 | |
55 | |
49 | |
46 |