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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors