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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Delta5858
Frequent Visitor

Want M power query

How to remove all romove all other rows exept specific in advance query editor

3 REPLIES 3
IanDavies
Helper III
Helper III

depending on the complexity, can you not just apply a filter or series of filters?

foodd_1-1690109922263.png

 

BA_Pete
Super User
Super User

Hi @Delta5858 ,

 

You need to use Table.SelectRows and give it logic to identify the rows you want to keep.

It can be as simple as this:

Table.SelectRows(
    previousStepName,
    each [Region] = "North"
)

 

Or it can be a bit more complex, like this:

Table.SelectRows(
    previousStepName,
    each ([Region] = "North" and [City] = "Manchester" and [Location] = "Trafford")
        or ([City] = "London" and [avgTemperature] <= 22.3)
        or ([Location] = "Alton Towers" and [noofCustomers] > 3000)
)

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors