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.
RankX is confusing to me so hoping someone can help me through this.
I have stores that have an average duration of a task. The lower the better (so I have to sort asc), but if there is no "average duration" for the store their ranking should be 0, right now it's ranking them all 1 and the first one with average duration a ranking after all the 1s. (so if there is 30 1s and all 0 average duration, then the first one with a value is ranked 31).
I tried to filter out those with average duration is blank but the ranking does not change.
Solved! Go to Solution.
@electrobrit try this measure
Rank = RANKX( FILTER( ALL( Store[StoreKey] ), [Avg Duration] <> BLANK() ), [Avg Duration], , ASC ) * DIVIDE( [Avg Duration], [Avg Duration] )
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
@electrobrit try this measure
Rank = RANKX( FILTER( ALL( Store[StoreKey] ), [Avg Duration] <> BLANK() ), [Avg Duration], , ASC ) * DIVIDE( [Avg Duration], [Avg Duration] )
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
Have another question, I used this same DAX when trying to get a little more granular with the actual employees. it helped with the same issue (thanks!), rank started with the first person who had actually had a value. However, the avg duration is the same for a lot of people creating duplicate ranks. How do I prevent this?
(I think it will help when I filter on the store too, no duplicates)
@electrobrit are you trying to rank employees across all the stores or rank the employee within the store?
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
actually the requirement is both
@electrobrit rank employees across all the dataset should be the same as we did for Rank for stores but yes ranking of employees withing store will need another enhancement to existing measure which I will post soon but in the meantime employee rank you should be able to get going.
Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!
Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo
If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤
Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.
THANK YOU! That worked
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 |
---|---|
113 | |
100 | |
78 | |
76 | |
52 |
User | Count |
---|---|
146 | |
109 | |
106 | |
88 | |
61 |