Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I have the below table and I am trying to rank the artists by count of year, and then show the the artist with the highest count by year. How can this be achieved in DAX? I have tried looking up how to RANK by COUNT but the solutions seemed a little convoluted for this.
Artist | Year |
Artist_1| | 2012 |
Artist_1| | 2012 |
Artist_1| | 2012 |
Artist_2| | 2012 |
Artist_2| | 2012 |
Artist_2| | 2012 |
Artist_2| | 2012 |
Artist_3| | 2012 |
Artist_2| | 2013 |
Artist_2| | 2013 |
Artist_2| | 2013 |
Artist_4| | 2013 |
Artist_4| | 2013 |
Artist_4| | 2013 |
Artist_4| | 2013 |
Artist_1| | 2013 |
The result I am looking for is:
Year | Artist |
2012| | Artist_2 |
2013| | Artist_4 |
I have calculated count of the year against the artist and sorted it to show the top first two artists as per your requirement.
How can I filter/remove the rest of the results?
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
76 | |
55 | |
37 | |
34 |
User | Count |
---|---|
99 | |
56 | |
53 | |
44 | |
40 |