Forum Discussion
Filtering rows based on cascading sequence
- 6 years ago
Hi mef47 ,
We can use the Power Query Editor to meet your requirement.
1. Filter the Model column, delete the rows that contain “gm”.
2. We sort the sample ID Ascending, and sort the Model Descending.
3. Then we need to Group the Sample ID column.
4. And we can add a custom column to add an index column. Each group has an index column.
5. Delete the first two columns. And expand the last column.
6. At last we need to filter the Rank column equal 1, then delete the rank column.
The result table just has four rows.
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.
Hi mef47 ,
We can use the Power Query Editor to meet your requirement.
1. Filter the Model column, delete the rows that contain “gm”.
2. We sort the sample ID Ascending, and sort the Model Descending.
3. Then we need to Group the Sample ID column.
4. And we can add a custom column to add an index column. Each group has an index column.
5. Delete the first two columns. And expand the last column.
6. At last we need to filter the Rank column equal 1, then delete the rank column.
The result table just has four rows.
If it doesn’t meet your requirement, could you please show the exact expected result based on the table that you have shared?
Best regards,
Community Support Team _ zhenbw
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
BTW, pbix as attached.