Forum Discussion
Filter rows based on unique preferance values
- 4 years ago
Hi,
Here is one way to do this:
1. Add conditional column: = Table.AddColumn(Source, "S_test", each if List.Contains({"Alex","Martin"},[Sales person]) then 1 else 0)
This will give 1 to rows with either Alex or Martin2. Sort by this column in descending order
3. use table.distinct on all but Sales person and the new conditional column:
= Table.Distinct(#"Changed Type", {"Order","Customer", "Sales date", "QTY"})
End result:I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/
Hi,
Here is one way to do this:
1. Add conditional column: = Table.AddColumn(Source, "S_test", each if List.Contains({"Alex","Martin"},[Sales person]) then 1 else 0)
This will give 1 to rows with either Alex or Martin
2. Sort by this column in descending order
3. use table.distinct on all but Sales person and the new conditional column:
= Table.Distinct(#"Changed Type", {"Order","Customer", "Sales date", "QTY"})
End result:
I hope this post helps to solve your issue and if it does consider accepting it as a solution and giving the post a thumbs up!
My LinkedIn: https://www.linkedin.com/in/n%C3%A4ttiahov-00001/