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.
Hi.
I am trying to drill down a chart that was built based on Top N personnel with overtime. So I have a 'Select N' filter and I also have a filter on date. I would like to show top N personnel with the most overtime for 3 months cumulative. So I'll select 3 months from the date filter. I have the following measures:
Solved! Go to Solution.
After many hours of research I was able to find a simple solution to my problem.
Measure 1
Total OT = CALCULATE( SUM( 'Data'[Hours]), ALLSELECTED('Data'[Date]))
Measure 2
Rank OT =
RANKX (
ALLSELECTED ('Data'[Name]),
CALCULATE (
[Total OT]
),
,
DESC,
Dense
)
Measure 3
Employee Rank = IF [Rank OT] <= [Selected N], "True", "False")
After many hours of research I was able to find a simple solution to my problem.
Measure 1
Total OT = CALCULATE( SUM( 'Data'[Hours]), ALLSELECTED('Data'[Date]))
Measure 2
Rank OT =
RANKX (
ALLSELECTED ('Data'[Name]),
CALCULATE (
[Total OT]
),
,
DESC,
Dense
)
Measure 3
Employee Rank = IF [Rank OT] <= [Selected N], "True", "False")
Hi @Anonymous
Can you provide some sample removing sensitive data?
Best Regards,
Caiyun Zheng
hi, suppose I have three columns: Name, Date and overtime and I wanted the top 3 persons for April, May and June cumulatively. The pivot table shows the ranking I would expect to see even if I drill down to see the trend of the 3 months.
Name Month/Year Overtime
John 1/1/2020 70
John 2/1/2020 35
John 3/1/2020 42
John 4/1/2020 61
John 5/1/2020 53
John 6/1/2020 13
David 1/1/2020 73
David 2/1/2020 45
David 3/1/2020 66
David 4/1/2020 13
David 5/1/2020 2
David 6/1/2020 1
Samantha 1/1/2020 10
Samantha 2/1/2020 48
Samantha 3/1/2020 17
Samantha 4/1/2020 4
Samantha 5/1/2020 3
Samantha 6/1/2020 49
Rose 1/1/2020 5
Rose 2/1/2020 2
Rose 3/1/2020 8
Rose 4/1/2020 5
Rose 5/1/2020 4
Rose 6/1/2020 10
Mark 1/1/2020 14
Mark 2/1/2020 6
Mark 3/1/2020 6
Mark 4/1/2020 20
Mark 5/1/2020 10
Mark 6/1/2020 6
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 | |
97 | |
85 | |
70 | |
61 |
User | Count |
---|---|
151 | |
121 | |
104 | |
87 | |
67 |