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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
nelson777
Frequent Visitor

Delete Rows base in different conditions

Hi there, I have a table where I have the contents of two columns appearing repeatedly on several rows.

I need PowerQuery to scan the table checking and deleting if the conditions are met.

Example: 

When "items.internalId" equals "items.startEpoch"  then deletes the row.

 2022-04-01 10_29_56-LM Query - Power BI Desktop.png

 

after some digging around I tried to use statements such as, "TableSelectRows", "IF" and "Table.RemoveRows" but got just errors as a result.

 

Thanks,

Nelson

1 ACCEPTED SOLUTION
Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

The easiest way would be to insert a custom column and put following formula and then filter on true

= [items.internalId] <> [items.startEpoch]

 

For one single step, below is Table.SelectRows statement

= Table.SelectRows(Source, each ([items.internalId] <> [items.startEpoch]))

View solution in original post

2 REPLIES 2
v-yanjiang-msft
Community Support
Community Support

Hi @nelson777 ,

Has your problem been solved by @Vijay_A_Verma's solution? If yes, please kindly consider accept it as the solution to help the other members find it more quickly.

By my test, it works fine, I also attach my sample below for reference.

If you have other confusion, please feel free to let me know.

 

Best Regards,
Community Support Team _ kalyj

Vijay_A_Verma
Most Valuable Professional
Most Valuable Professional

The easiest way would be to insert a custom column and put following formula and then filter on true

= [items.internalId] <> [items.startEpoch]

 

For one single step, below is Table.SelectRows statement

= Table.SelectRows(Source, each ([items.internalId] <> [items.startEpoch]))

Helpful resources

Announcements
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.