Forum Discussion
removing items by adding a conditional line in the query
Hi There....I want to remove items from a column by adding a condition in the query....please help me how do I proceed
You can add a filter steps using any of your current values and then modify using the pattern below.
= Table.SelectRows(#"Previous Step", each List.Contains({"CurrentItem", "FutureItem"}, [ColumnToFilter]) = false)
Pat
4 Replies
- Portrek
Resolver III
You can just put filter in your columns e select the itens that you want or need. After the selection, load the table.
- Analyst001Frequent Visitor
I cannot use filters as one item is from the list and one is coming in the future
- mahoneypat
Microsoft Employee
You can add a filter steps using any of your current values and then modify using the pattern below.
= Table.SelectRows(#"Previous Step", each List.Contains({"CurrentItem", "FutureItem"}, [ColumnToFilter]) = false)
Pat
- AnonymousNot applicable
Hi Analyst001
Your needs are not very clear, maybe you can provide some data or the results you want ?
I created a sample , you can refer to it
Original data:
I want to remove the content of 2 from the content of 1 .
And add a custom column .
Result=Text.Combine(List.RemoveItems(Text.Split([Column1],","),Text.Split([Column2],",")),",")
The effect is as shown:
Best Regards
Community Support Team _ Ailsa Tao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.