Microsoft is giving away 50,000 FREE Microsoft Certification exam vouchers. Get Fabric certified for FREE! Learn more
The table contains sensitive information so I will summarize what's happening.
I have a table that contains project records - the 3 columns I care about are 'Name', 'Client', and 'Allocation'. There are multiple rows that have the same values in the 'Name' column and I want to only keep the first (at most) 3 rows for each name.
Is there a simple way to do this? I am quite new to Power BI so any direction would be helpful.
Solved! Go to Solution.
You can group and index data like described in this post, then filter out rows with index > 3:
https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query
You might have to use Table.Buffer to make sure the sorting order is actually applied before you cut off the unwanted rows. Read this for reference:
https://exceleratorbi.com.au/remove-duplicates-keep-last-record-power-query/
You can group and index data like described in this post, then filter out rows with index > 3:
https://radacad.com/create-row-number-for-each-group-in-power-bi-using-power-query
Many thanks - I decided I also wanted it sorted on date ascending so I sorted the table and added an index column before following the steps in the post you linked. Worked like a charm
User | Count |
---|---|
100 | |
68 | |
59 | |
47 | |
46 |