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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
FraNik16
New Member

Eliminate rows with cancel status in power bi

Hi! I have a table that contains many columns, one of them is the "project status", I need to eliminate those with status different than "Cancel". I would like to know how can I delete the rows from the table?

important details:

- Each row has different status so they are alternated

- The data comes from a SharePoint site that have many tables and I can't eliminate the rows directly from the source

 

Thank you

1 ACCEPTED SOLUTION
AjithPrasath
Resolver II
Resolver II

Hi @FraNik16 ,

  You can do it in power query using the below code:

FilteredTable = Table.SelectRows(YourTable, each [project status] <> "Cancel")

 

If I answered your question, please mark my post as solution, Appreciate your Kudos👍

View solution in original post

3 REPLIES 3
AjithPrasath
Resolver II
Resolver II

Hi @FraNik16 ,

  You can do it in power query using the below code:

FilteredTable = Table.SelectRows(YourTable, each [project status] <> "Cancel")

 

If I answered your question, please mark my post as solution, Appreciate your Kudos👍

FraNik16
New Member

Many thanks for your reply, I'll do that! I have another question, what if I can filter but directly in the power query? I can erase the data from the source but I can do it in my dataset.

 

thanks again!

AjithPrasath
Resolver II
Resolver II

Hi @FraNik16 ,

 Please follow the below steps:

 

  1. Open your Power BI file and go to the "Report" or "Data" view.

  2. In the "Fields" pane on the right side, locate the table that contains the "project status" column.

  3. Right-click on the table and select "New Measure" to create a new measure.

  4. In the formula bar, enter the following DAX expression:

 

Filtered Table = FILTER('YourTable', 'YourTable'[project status] <> "Cancel")

 

 

Replace 'YourTable' with the name of your table, and 'project status' with the column name that contains the project status.

  1. Press Enter to create the measure. This measure will create a new table called "Filtered Table" that includes only the rows where the project status is "Cancel".

  2. You can now use the "Filtered Table" in your visuals or analysis.

Best Regards,

Ajith Prasath

 

If this post helps, then please consider Accept it as the solution and give kudos to help the other members find it more quickly.

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors