Forum Discussion
Anonymous
6 years agoNot applicable
remove rows based on condition on another column
hello I have data similar to this and I want to remove ids that have not go through C step id steps 1 a 2 a 2 b 1 b 1 c 3 a so the expected result is 1 ...
- 6 years ago
Hi Anonymous
Insert this formula as a custom column in Power Query:
let varID = [id] in Table.MatchesAnyRows( Table.SelectRows(#"Changed Type", each [id] = varID), each [steps] = "c" )It will return this table:
Then simply filter to filter out the "FALSE" values, and you will be left with your table above, the ID's that are 1 and have gone through step C.
Note: this will work as long as there is a step C. If there is also a D, E, and F, it will still keep that data.
Anonymous
6 years agoNot applicable
thank you Mariusz but if I have more than two columns can I show all the columns?
Mariusz
6 years agoCommunity Champion
Hi Anonymous
You could select any column that is present in your table as Group by rows Column was inclusive of all columns in a dataset.
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.