cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ataladay Frequent Visitor
Frequent Visitor

Table.RemoveMatchingRows with multiple criteria

Hello All,

 

Trying to get RemoveMatchingRows to work:

Table.RemoveMatchingRows(table as table, rows as list, optional equationCriteria as any) as table

 

I have a table of general ledger data that has the following columns:

 

Account #, Cost Center, Year, Company, January, February, March, April, May, June, July, August, September, October, November, December

 

I want to remove rows where each column January - December = 0.  I've done this another way (did a keep rows where each does not equal 0 OR next row does not equal 0, etc.), could've also created a column that takes the absolute value of each column, but I would like to figure out how to use the Table.RemoveMatchingRows.

 

I tried this equation:

 

Table.RemoveMatchingRows(#"Calculated Text Length",{[January = 0], [February = 0], [March = 0], [April = 0], [May = 0], [June = 0], [July = 0], [August = 0], [September = 0], [October = 0], [November = 0], [December = 0]})

 

Is it not working because I don't have the "optional equation criteria"?  I tried just Table.RemoveMatchingRows(#"Calculated Text Length",{[January = 0]}, "January" and that filtered out rows, but my original did not filter out any.

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User I
Super User I

Re: Table.RemoveMatchingRows with multiple criteria

I don't think you need any optional equation in this case.

Try

Table.RemoveMatchingRows(#"Calculated Text Length",{[January = 0, February = 0, March = 0, April = 0, May = 0, June = 0, July = 0, August = 0, September = 0, October = 0, November = 0, December = 0]})

View solution in original post

2 REPLIES 2
Super User I
Super User I

Re: Table.RemoveMatchingRows with multiple criteria

I don't think you need any optional equation in this case.

Try

Table.RemoveMatchingRows(#"Calculated Text Length",{[January = 0, February = 0, March = 0, April = 0, May = 0, June = 0, July = 0, August = 0, September = 0, October = 0, November = 0, December = 0]})

View solution in original post

Community Support Team
Community Support Team

Re: Table.RemoveMatchingRows with multiple criteria

Hi @ataladay ,

Have you solved your problem with the suggestion of @HotChilli ?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please share some data sample and your desired output so that we could help further on it.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors
Top Kudoed Authors