Forum Discussion
kirbynguyen
Helper II
5 years agoMax of Aggregation
Hello, I am trying to find the max of aggregated data and I've been having trouble. Here is a sample input: Date Name Category Value 1/1/2021 A Bag 5 1/2/2021 A Ba...
- 5 years ago
Hey kirbynguyen ,
I assume this measure creates what you are looking for:
Measure = var __t = ADDCOLUMNS( CALCULATETABLE( SUMMARIZE( 'Table' , 'Table'[Name ] , 'Table'[Category ] ) , ALL( 'Table'[Category ] ) ) , "val" , CALCULATE( SUM( 'Table'[Value] ) ) ) return GROUPBY( __t , "v" , MAXX( CURRENTGROUP() , [val] ) )At least it allows to create a table visual that shows the desired output:
Hopefully, this is what you are looking for.
Regards,
Tom
dkaushik
Resolver II
5 years agoHi kirbynguyen ,
Try creating a table by dragging your "Category", "Name" and "Values" fields, and you will have your output table ready.
Thanks,
Dheeraj
If this post helps, then please consider Accept it as the solution and give thumbs up to help the other members find it more quickly.
kirbynguyen
Helper II
5 years agoI don't think you understand what I am trying to do here. The output of your suggestion would be:
| Name | Category | Value |
| A | Bag | 13 |
| A | Cup | 6 |
| B | Bag | 10 |
| B | Cup | 15 |
The values for A should be the same and the values for B should be the same. I was expecting some DAX to solve this