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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.

Top Solution Authors
Top Kudoed Authors