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
I have created a metric to calculate the rank based on sales.
Now I want to do some further calculation for which I need Max of the Rank.
I tried to create a simple metric to get the Max:
MaxRank=Max(RankMetric)
But Max can only be used with a column and not a metric.
Any solution for this?
Solved! Go to Solution.
Hi @vanessa,
As the max value of rank equals to the max row number of table visual, and it is dynamically changed according to slicer selection, it is not allowed to wrap a measure inside MAX function, you can directly count the row number. Similar to:
max Rank = CALCULATE ( COUNT ( 'Sales Table'[Category] ), ALLSELECTED ( 'Sales Table' ) )
Best regards,
Yuliana Gu
Hi @vanessa,
As the max value of rank equals to the max row number of table visual, and it is dynamically changed according to slicer selection, it is not allowed to wrap a measure inside MAX function, you can directly count the row number. Similar to:
max Rank = CALCULATE ( COUNT ( 'Sales Table'[Category] ), ALLSELECTED ( 'Sales Table' ) )
Best regards,
Yuliana Gu
Just make a column for your ranking, and hide it?
The rank is dynamic based on the selected filters:
I am ranking the product based on sales for the selected store and product category. Hence column won't help.
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
| User | Count |
|---|---|
| 41 | |
| 38 | |
| 36 | |
| 30 | |
| 28 |
| User | Count |
|---|---|
| 129 | |
| 88 | |
| 79 | |
| 68 | |
| 63 |