The ultimate Microsoft Fabric, Power BI, Azure AI, and SQL learning event: Join us in Stockholm, September 24-27, 2024.
Save €200 with code MSCUST on top of early bird pricing!
Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started
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.
Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.
Check out the August 2024 Power BI update to learn about new features.
User | Count |
---|---|
108 | |
77 | |
73 | |
47 | |
39 |
User | Count |
---|---|
137 | |
108 | |
69 | |
64 | |
56 |