March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
Hi everyone, so this is a really tricky problem that I've been stuck on all week... I have a dataset of orders and the employees who processed them where we calculate KPIs. I would like to make a report of "Top 3 Employees by Metric" where I have bar charts with the number 1, 2, and 3 employees for a given metric (think olympic podium style) on the x-axis, and their values as 1 (for the number 1 employee), 2 (for number 2), and 3 (for number 3). I'll just stick with three metrics for simplicity's sake, here is the starting data table:
Order Number | Employee | Item Count | Cancelled Count | Return Count |
1 | Joe | 3 | 2 | 1 |
2 | Bob | 5 | 0 | 2 |
3 | Sue | 2 | 1 | 1 |
And here is the output table I would like to achieve:
Rank | Item Count | Cancelled Count | Return Count |
1 | Bob | Bob | Joe |
2 | Joe | Sue | Sue |
3 | Sue | Joe | Bob |
As you can tell there are situations where I need to break ties (e.g. in the return count metric, Joe and Sue are tied) and I would like to break the ties using the total Item Count column. I've tried using the RANKX and TOPN functions with no luck, though I'm probably doing something wrong. When I can get them to rank at all, many times they are all rank 1, or sometimes the ranks are clearly incorrect (like saying 4 is greater than 10). In addition this output needs to react to changing slicers on the page (e.g. someone choosing a new store with different employees, or a different date range). Any ideas? I need to get a draft of this out by tomorrow and have kinda exhausted all the other options. Thanks!
Hi, @rjennings
Please check the below picture and the sample pbix file's link down below.
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.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.
Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.
User | Count |
---|---|
23 | |
16 | |
15 | |
7 | |
6 |
User | Count |
---|---|
33 | |
29 | |
16 | |
13 | |
12 |