Starting December 3, join live sessions with database experts and the Microsoft product team to learn just how easy it is to get started
Learn moreGet certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now
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
Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.
User | Count |
---|---|
86 | |
84 | |
83 | |
67 | |
49 |
User | Count |
---|---|
131 | |
111 | |
96 | |
71 | |
67 |