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
Anonymous
Not applicable

Advanced Filter "Contains" Caps Sensitive

Hello,

 

I have designed a report that has a table with a field "Item Description". Some descriptions have been entered as all CAPS while others are all lower case. For example RED BALL vs Blue Ball. In this example, I set up an advanced filter, "contains" on the description, "Ball" and only the second result is displayed, while a filter for "BALL" displays only the first result.

 

Is there a way I can indicate that this field is not case sensitive, or can filter without case sensitivity??

 

Thank you in advance,

 

Michael

1 ACCEPTED SOLUTION
edhans
Super User
Super User

If you mean in Power Query, then yes:

  • Before the filter, transform that column to be either all upper, lower, or proper. Whatever you want, but then it is consistent.

Unfortunately, Table.SelectRows doesn't seem to support Comparer.OrdinalIgnoreCase as an argument. With Table.Distinct, for example, you can do this:

 

= Table.Distinct(#"Changed Type", Comparer.OrdinalIgnoreCase)

and it ignores case.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

6 REPLIES 6
v-lid-msft
Community Support
Community Support

Hi @Anonymous ,

 

Based on my test, it can filter without case sensitive if you are use in Page Filter or Visual Filter:

 

3.PNG

 


BTW, pbix as attached.

 

Best regards,

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

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

I am encountering issues strictly with DirectQuery. My import models are not affected...

What are the issues? Can you post a sample of your M-Code that breaks direct query? Just the source, one column, and your transformation.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
edhans
Super User
Super User

If you mean in Power Query, then yes:

  • Before the filter, transform that column to be either all upper, lower, or proper. Whatever you want, but then it is consistent.

Unfortunately, Table.SelectRows doesn't seem to support Comparer.OrdinalIgnoreCase as an argument. With Table.Distinct, for example, you can do this:

 

= Table.Distinct(#"Changed Type", Comparer.OrdinalIgnoreCase)

and it ignores case.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting
Anonymous
Not applicable

Hi @edhans 

 

Thank you for your response.

 

Do you have a solution that is compatible with DirectQuery?

 

Michael

Not sure exactly what you mean. Case transformations are supported by Direct Query, at least for SQL Server. This works fine - see the Lowercased Text statement below:

 

let
    Source = Sql.Database("localhost", "AdventureWorks2017"),
    Production_ProductModel = Source{[Schema="Production",Item="ProductModel"]}[Data],
    #"Lowercased Text" = Table.TransformColumns(Production_ProductModel,{{"Name", Text.Lower, type text}})
in
    #"Lowercased Text"

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

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.