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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
AmberJane
Helper III
Helper III

Remove Unwanted RANDOM Rows from Data

I have a list of tickets I am pulling from a ticketing system into Power BI using ODATA. The report I am building will be sent to a client each month and will need to be "Groomed" before sending. 

 

Sometimes there is bad data/tickets that don't need to be in this report. There is no condition that I can power query off of as these will be one offs based off the monthly review.

 

I found a youtube video that worked but only seems to let me remove one row. I want to be able to remove multiple. Any suggestions. 

 

I added an index column and then used advanced editor: 

 

#"Added Index" = Table.AddIndexColumn(#"Sorted Rows", "Index", 0, 1, Int64.Type),
#"Remove Row" = Table.RemoveRows(#"Added Index",83)
in
#"Remove Row"

2 ACCEPTED SOLUTIONS
AmberJane
Helper III
Helper III

@Anonymous received an error:

 

Error: Expression.SyntaxError: Token ',' expected.

 

#"Added Index" = Table.AddIndexColumn(#"Removed Top Rows", "Index", 0, 1, Int64.Type)
#"Remove Row" = Table.SelectRows(#"Added Index", each not List.Contains({4,5}, [Index]))
in
#"Remove Row"

View solution in original post

Anonymous
Not applicable

Hi @AmberJane , You just missed a comma at the end of the previous step. 

 

Regards,

Jing

View solution in original post

4 REPLIES 4
AmberJane
Helper III
Helper III

@Anonymous received an error:

 

Error: Expression.SyntaxError: Token ',' expected.

 

#"Added Index" = Table.AddIndexColumn(#"Removed Top Rows", "Index", 0, 1, Int64.Type)
#"Remove Row" = Table.SelectRows(#"Added Index", each not List.Contains({4,5}, [Index]))
in
#"Remove Row"

Anonymous
Not applicable

Hi @AmberJane , You just missed a comma at the end of the previous step. 

 

Regards,

Jing

Oh my how embarrassing!! it worked thank you so much. 

Anonymous
Not applicable

Hi @AmberJane 

 

If you are sure which rows are unwanted by their Index numbers, you can try this 

#"Remove Row" = Table.SelectRows(#"Added Index", each not List.Contains({1,3,4,83}, [Index]))

Put all unwanted index numbers in a list {}. 

 

Best Regards,
Jing
If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

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

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.

Top Kudoed Authors