Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
hobosapien
Helper I
Helper I

Partitioning and ranking a list via DAX

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.

 

ArtistYear
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:

 

YearArtist
2012|Artist_2
2013|Artist_4

 

 

2 REPLIES 2
UditJ
Helper III
Helper III

 I have calculated count of the year against the artist and sorted it to show the top first two artists as per your requirement. 

UditJ_0-1718158717783.png

 

How can I filter/remove the rest of the results?

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.