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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
ConnieMaldonado
Responsive Resident
Responsive Resident

Delete Rows from a Merged Query in power query editor

Hello - 

I have merged 2 tables in the power query editor to create a MergedTable.

 

I want to delete all rows in the MergedTable in which category <> "Split".

 

I can't figure out how to do that.

 

When I go to the Power Editor, the only option I see from the ribbon is to Remove Rows - choices are top x or bottom x or alternating, etc.  I can also choose to Keep Rows with similar options.

 

What's the syntax to remove the rows using the criteria category <> "Split"?  Can’t I add that logic directly to the query?

 

Thanks for any help.

1 ACCEPTED SOLUTION
HotChilli
Super User
Super User

Can you select a filter from the column header (category?)

View solution in original post

6 REPLIES 6
HotChilli
Super User
Super User

Ah, I think I understand.  You managed to filter the data but you were looking for an additional process to 'complete' but the filter was the final step in the process.

It's not like the powerbi desktop data view where you can filter the data for inspection but the table is still populated with all rows.

Exactly!  I was thinking of data manipulation in Excel - if you want to remove the rows, you physically have to delete them.  Don't worry, I catch on fast. 😃  Thanks again.

HotChilli
Super User
Super User

Let me be clearer.  Each column header has a dropdown caret, click on that.  You will see options which are customised depending on the data type.

ConnieMaldonado
Responsive Resident
Responsive Resident

I think I figured this out.  Filtering in the power query removes the rows - you don't physically have to delete the records once you've set the filter.  Duh.  Thanks.

HotChilli
Super User
Super User

Can you select a filter from the column header (category?)

Yes, I can filter the rows I want to delete, but I'm not sure how to actually delete them once I've done that.  As I said, when I select "Remove Rows" there's no option to delete everything that's filtered.

 

I'm a newbie to the power query editor.  My dba performed most of the data manipulation in SQL before I received the data, but he was let go due to downsizing so I'm trying to figure things out.

 

Thank you!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.