Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi,
I have a table like below:
When the user selects multiple months on Power BI, for example January and February, I show the following:
On the card I have to show the Maximum Revenue which is 260,000. As it will be 'Category A' which will be always the maximum, I can also say Category = 'Category A' in the measure. I am using the below measure for the card:
Total Revenue = MAXX('Test Table','Test Table'[Revenue])
However, it is not showing the aggregated total 260,000 instead it is showing 135,000 which is the maximum for February. What am I doing wrong?
Thanks.
Solved! Go to Solution.
The measure you've written iterates over each of the rows of 'Test Table' within the filter context and each month is in a separate row of this data table. You haven't told it that you want to aggregate before taking a max.
You need to iterate over the granularity that you want to aggregate at:
Max Description-Category Revenue =
MAXX (
SUMMARIZE (
'Test Table',
'Test Table'[Description],
'Test Table'[Category],
"Rev", SUM ( 'Test Table'[Revenue] )
),
[Rev]
)
The measure you've written iterates over each of the rows of 'Test Table' within the filter context and each month is in a separate row of this data table. You haven't told it that you want to aggregate before taking a max.
You need to iterate over the granularity that you want to aggregate at:
Max Description-Category Revenue =
MAXX (
SUMMARIZE (
'Test Table',
'Test Table'[Description],
'Test Table'[Category],
"Rev", SUM ( 'Test Table'[Revenue] )
),
[Rev]
)
It worked. Thanks!! 😊
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 14 | |
| 7 | |
| 4 | |
| 4 | |
| 3 |
| User | Count |
|---|---|
| 23 | |
| 10 | |
| 10 | |
| 6 | |
| 5 |