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 have a table that contains the results from a customer survey , based on the engineers visit. I need to create a monthly leader board to show the best monthtly rated engineer.
Facts survey table - connected to dates table
Engineer | Survey Ref | Survey Date | Rating | Out of |
Engineer 1 | S1 | 01/01/2022 | 4 | 5 |
Engineer 1 | S2 | 02/01/2022 | 4 | 5 |
Engineer 1 | S3 | 03/01/2022 | 5 | 5 |
Engineer 1 | S4 | 04/01/2022 | 5 | 5 |
Engineer 1 | S5 | 01/02/2022 | 5 | 5 |
Engineer 1 | S6 | 02/02/2022 | 5 | 5 |
Engineer 1 | S7 | 03/02/2022 | 5 | 5 |
Engineer 1 | S8 | 04/02/2022 | 5 | 5 |
Engineer 2 | S9 | 01/01/2022 | 5 | 5 |
Engineer 2 | S10 | 02/01/2022 | 5 | 5 |
Engineer 2 | S11 | 03/01/2022 | 5 | 5 |
Engineer 2 | S12 | 04/01/2022 | 5 | 5 |
Engineer 2 | S13 | 01/02/2022 | 3 | 5 |
Engineer 2 | S14 | 02/02/2022 | 3 | 5 |
Engineer 2 | S15 | 03/02/2022 | 4 | 5 |
Engineer 2 | S16 | 04/02/2022 | 5 | 5 |
Based on the small sample table above. These would be the results I would expect to see
Monthly Highest Rating Engineer Leader board
Jan | Feb |
Engineer 2 | Engineer 1 |
Does anyone have any idears how to do this with a DAX function.
thank you
Richard
Solved! Go to Solution.
@cottrera
Create this measure:
Measure =
VAR _tbl =
ADDCOLUMNS(
VALUES(survey[Engineer]),
"@Total Rating", CALCULATE(SUM(survey[Rating ]))
)
VAR _max_rating = MAXX(_tbl, [@Total Rating])
VAR _top_tbl =
FILTER(
_tbl,
[@Total Rating] = _max_rating
)
VAR _result =
CONCATENATEX(_top_tbl, survey[Engineer], ", ")
RETURN
_result
link to file with the solution:
DAX - Monthly leader board.pbix
@cottrera
Create this measure:
Measure =
VAR _tbl =
ADDCOLUMNS(
VALUES(survey[Engineer]),
"@Total Rating", CALCULATE(SUM(survey[Rating ]))
)
VAR _max_rating = MAXX(_tbl, [@Total Rating])
VAR _top_tbl =
FILTER(
_tbl,
[@Total Rating] = _max_rating
)
VAR _result =
CONCATENATEX(_top_tbl, survey[Engineer], ", ")
RETURN
_result
link to file with the solution:
DAX - Monthly leader board.pbix
Thank you for the quick response 😀 Love the showcase report
@cottrera thank you my friend! Please give it a kudos 😀
*Will appreciate also kudos for my messages here 😉
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 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |