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
Anonymous
Not applicable

Limit number of rows in groups/ranking

I'm having difficulties trying to manually limit the number of rows per group in Power BI using DAX.

 

The data is only for illustrating purposes and the granularity of the key is higher in the real data.

They key is not unique and could appear more than 1 time in table 1.

 

I'm trying to limit the number of rows assigned per group (person), they are chosen based on a key + a score which is calculated in another table. The trader with max score is used to lookup the name of the person in the same table. The problem is the concentration of the rows and therefore my aim is to limit the amount of rows assigned to each person to, lets say maximum 3 rows, and thereby assign the exceeding rows to the second highest score and if more than 3 rows assigned to him then the third best gets the remaining etc.

 

I have already tried to rank the persons based on their score and likewise numbered the leads based on the persons rows. But I'm not quite sure if this is the right way to go, or how to construct the IF statement.

 

Brief: How do I create a column which ensures that the PersonName is only showed maximum 3 times and the remaining rows which the first trader was most appropriate are assigned the next most suited person?

 

Is there any workaround for this?

 

Your help is much appreciated!

1 REPLY 1
Anonymous
Not applicable

The data

 

image.png

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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.