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

Get Fabric certified for FREE! Don't miss your chance! Learn more

Reply
arkiboys2
Contributor

dataflow gen2 filter

in dataflow gen2 filter how to have this applied?

column2 not equal to lower(trim('buy'))

 

so if the value is 'Buy' or 'buy' then I want to make sure the column2 is not equal to either one of these.

 

thank you

2 ACCEPTED SOLUTIONS
Anonymous
Not applicable

Hi @arkiboys2 ,

 

Thanks for the reply from frithjof_v . The syntax he provided is basically correct, with a small modification on my part.

 

You mean you want to filter out the data in Column2 with value 'Buy' or 'buy' right, am I understanding it correctly?

 

This is the data I created to use for testing:

ID            Column2

1             buy

2             sales

3             Twins

4             Buy

5             Boy

6             Girl

7             girl

8             Buy

9             buy

10           buy

 

Modify the code as follows:

Table.SelectRows(#โ€œChanged column typeโ€, each Text.Lower(Text.Trim([Column2])) <> โ€œbuyโ€)

 

The final display is as follows:

vhuijieymsft_0-1731034817722.png

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

View solution in original post

frithjof_v
Honored Contributor

The easiest way to do this, is:

 

  1. In the user interface, make a random filter selection. In Column2 filter dropdown, choose some random value. It doesn't matter which value you choose.
  2. The previous step will automatically generate some M code, where the Table.SelectRows function is used.
  3. Then, manually replace the contents of the Table.SelectRows function with the actual code:

Table.SelectRows(#"name Of Previous Step", each Text.Lower(Text.Trim([column2])) <> "buy")

View solution in original post

3 REPLIES 3
frithjof_v
Honored Contributor

This is what ChatGPT gave me:

 

= Table.SelectRows(#"yourTableName", each Text.Lower(Text.Trim([column2])) <> "buy")

 

 

Does it work for your case?

 

* the yourTableName shall be replaced by the name of the preceding step in your M query.

Anonymous
Not applicable

Hi @arkiboys2 ,

 

Thanks for the reply from frithjof_v . The syntax he provided is basically correct, with a small modification on my part.

 

You mean you want to filter out the data in Column2 with value 'Buy' or 'buy' right, am I understanding it correctly?

 

This is the data I created to use for testing:

ID            Column2

1             buy

2             sales

3             Twins

4             Buy

5             Boy

6             Girl

7             girl

8             Buy

9             buy

10           buy

 

Modify the code as follows:

Table.SelectRows(#โ€œChanged column typeโ€, each Text.Lower(Text.Trim([Column2])) <> โ€œbuyโ€)

 

The final display is as follows:

vhuijieymsft_0-1731034817722.png

 

If you have any other questions please feel free to contact me.

 

Best Regards,
Yang
Community Support Team

 

If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

frithjof_v
Honored Contributor

The easiest way to do this, is:

 

  1. In the user interface, make a random filter selection. In Column2 filter dropdown, choose some random value. It doesn't matter which value you choose.
  2. The previous step will automatically generate some M code, where the Table.SelectRows function is used.
  3. Then, manually replace the contents of the Table.SelectRows function with the actual code:

Table.SelectRows(#"name Of Previous Step", each Text.Lower(Text.Trim([column2])) <> "buy")

Helpful resources

Announcements
Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Free Fabric Certifications

Free Fabric Certifications

Get Fabric certified for free! Don't miss your chance.

January Fabric Update Carousel

Fabric Monthly Update - January 2026

Check out the January 2026 Fabric 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.

Users online (12,760)