The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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!
The data
User | Count |
---|---|
16 | |
8 | |
6 | |
6 | |
5 |
User | Count |
---|---|
23 | |
13 | |
13 | |
8 | |
8 |