Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply
Analyst001
Frequent Visitor

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

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
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





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

4 REPLIES 4
Anonymous
Not 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:

Ailsa-msft_0-1620869043833.png

I want to remove the content of 2 from the content of 1 .

And add a custom column .

Ailsa-msft_1-1620869043836.png

Result=Text.Combine(List.RemoveItems(Text.Split([Column1],","),Text.Split([Column2],",")),",")

The effect is as shown:

Ailsa-msft_2-1620869043837.png

 

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.

mahoneypat
Microsoft Employee
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





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Portrek
Resolver III
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.

I cannot use filters as one item is from the list and one is coming in the future

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.