Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Dear Colleagues,
I have a measure that is simply the variation of sales YTD.
varYTD = DIVIDE([SalesYTD 2017],[SalesYTD 2016])-1)
And a report in Power BI where on rows I have the stores and on columns I have: Sales 2016, Sales 2017 & varYTD.
How can I show only the top 10 stores based on the biggest varYTD (not based on the biggest sales)?
Many thanks,
Viorel
Bucharest
Solved! Go to Solution.
Give it a try...
IF(RANKX(ALLSELECTED(STORE[STORES]),varYTD,,0,DENSE)<=10,varYTD,BLANK())
Instead of "0" try with "1" represents asceding order ... This should work...
IF(RANKX(ALLSELECTED(STORE[STORES]),varYTD,,1,DENSE)<=10,varYTD,BLANK())
Give it a try...
IF(RANKX(ALLSELECTED(STORE[STORES]),varYTD,,0,DENSE)<=10,varYTD,BLANK())
Thanks a lot, @Anonymous,
It works like a charm!
Kind regards,
Viorel
Dear @nvpraveenyakkal,
How do I modify it for Bottom 10?
I have tried to replace "<=10" with ">TotalNumberofStores - 10", but it shows all stores.
Many thanks,
Viorel
Instead of "0" try with "1" represents asceding order ... This should work...
IF(RANKX(ALLSELECTED(STORE[STORES]),varYTD,,1,DENSE)<=10,varYTD,BLANK())
Again it works like a charm!
I remain indebted to you, @Anonymous!
Have a nice day!
Viorel
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
97 | |
96 | |
81 | |
74 | |
66 |
User | Count |
---|---|
126 | |
106 | |
105 | |
86 | |
72 |