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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register Now

Helper V
Helper V

MATRIX Ordinal Rank / Top N by category/subcategory

I'm trying to get the ordinal rank for the following matrix. How would I go about displaying just the Top N results per month in the following Matrix?For example, how do I get only the first 20 records per Month regardless of ties in the Product column?


I've played around with Ranking by products but this gives me more than the Top N as there are duplicates. I've tried determining the number of duplicates but that measure is returning the incorrect value.



Super User
Super User

I have the rank. I only want the Top N rows regardless of ties. If I want the top 20 rows and I filter on rank <= 20, I'll get more than 20 records due to ties.



Thanks. I wound up breaking the tie by mimicking the MIN example in your link and then adding that to my value in the Rank. Basically guarantees adding less than 1 to every record and thus not distorting the overall rank other than ties.

Helpful resources

Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

Check out the February 2024 Power BI update to learn about new features.

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.