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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

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
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.