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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Delete rows based on column values

Hello,

I have the following table loaded in Power Query and i am trying to delete specific rows:

1. If the Document ID is 4050 and Date is 01/08/2022.

2. If the Document ID is 4160 and Date is 15/07/2022.

Any help is much appreciated!

 

Document IDDateAmount
399804/08/20222439.17
405004/08/20221176.56
405001/08/2022791024.45
406015/07/202211810.25
413920/07/202212352.03
414515/07/202281045.86
414905/07/2022365.95
415705/07/20224509.88
416015/07/202252011
416006/07/20222922.4
416415/07/20229592.56
416615/07/202232471.67
418715/07/20226793.62
418715/07/202233938.1
1 ACCEPTED SOLUTION

Hi all,

 

I think it may need to be something like:

each not (([Document ID] = "4050" and [Date] = #date(2022,8,1)) or ([Document ID] = "4160" and [Date] = #date(2022,7,15)))

in the condition/filter.

 

Kind regards,

John 

View solution in original post

2 REPLIES 2
KT_Bsmart2gethe
Impactful Individual
Impactful Individual

Hi @Anonymous ,

 

Add a custom step:

 

Table.SelectRows(PreviousStepName, each ([Document ID] <> "4050" and [Date] <> #date(2022,8,1)) or ([Document ID] <> "4160" and [Date] <> #date(2022,7,15))))

 

Regards

KT

Hi all,

 

I think it may need to be something like:

each not (([Document ID] = "4050" and [Date] = #date(2022,8,1)) or ([Document ID] = "4160" and [Date] = #date(2022,7,15)))

in the condition/filter.

 

Kind regards,

John 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.

Top Solution Authors