Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
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
User | Count |
---|---|
124 | |
108 | |
99 | |
65 | |
62 |
User | Count |
---|---|
137 | |
116 | |
102 | |
71 | |
61 |