Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!
Hello everyone,
I tried to create a ranking measure to rank people who has a highest number of resolved task by week using DAX but it doesn't work
The data table is in this form:
week | assignee | task | status |
week 1 | developer A | task 1 | resolved |
week 1 | developer A | task 2 | resolved |
week 1 | developer B | task 3 | resolved |
week 2 | developer B | task 4 | resolved |
week 2 | developer B | task 5 | resolved |
week 2 | developer B | task 6 | resolved |
I want to get a measure that count :
week | developer | Resolved Task | Rank |
week 1 | A | 2 | 1 |
B | 1 | 2 | |
week 2 | A | 0 | 2 |
B | 3 | 1 |
Thank you in advance for your help !!
Solved! Go to Solution.
Please try a measure like this instead, using your actual table/column/measure names. Note that since the Assignee column is in the same table and A has no rows, they do not show in Week 2. If you make a separate Assignee table and relate it, you can get it show with a +0 type measure (not best practice to do +0).
ResolvedRank =
VAR vAssigneesInScope =
CALCULATETABLE (
DISTINCT ( Tasks[assignee] ),
REMOVEFILTERS ( Tasks[assignee] )
)
RETURN
RANKX ( vAssigneesInScope, [ResolvedTasks],, DESC )
Pat
Hi,
Please check the below picture and the attached pbix file.
Rank resolved count by week: =
IF (
HASONEVALUE ( Week[week] ),
RANKX ( ALL ( assign[assignee] ), [Resolved count:],, DESC )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension! |
DAX is simple, but NOT EASY! |
Hi,
Please check the below picture and the attached pbix file.
Rank resolved count by week: =
IF (
HASONEVALUE ( Week[week] ),
RANKX ( ALL ( assign[assignee] ), [Resolved count:],, DESC )
)
If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.
Please try a measure like this instead, using your actual table/column/measure names. Note that since the Assignee column is in the same table and A has no rows, they do not show in Week 2. If you make a separate Assignee table and relate it, you can get it show with a +0 type measure (not best practice to do +0).
ResolvedRank =
VAR vAssigneesInScope =
CALCULATETABLE (
DISTINCT ( Tasks[assignee] ),
REMOVEFILTERS ( Tasks[assignee] )
)
RETURN
RANKX ( vAssigneesInScope, [ResolvedTasks],, DESC )
Pat
Hello @hhaimer
If I understood correctly you want to rank each developper per week according to their number of resolved task.
I changed week X by X so it's cleaner.
First I created a column to calculate the number
Then, I created the rank for each week from this number:
You need to specify not summarize for the column when you put it in your table.
Hope it helps
Have a good day
User | Count |
---|---|
47 | |
28 | |
23 | |
18 | |
15 |
User | Count |
---|---|
55 | |
34 | |
18 | |
17 | |
15 |