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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors