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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

Check out the June 2024 Power BI update to learn about new features.

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

Top Solution Authors
Top Kudoed Authors