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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
DebbieE
Community Champion
Community Champion

Conditional Column Case sensitive

Im creating flags using Text.

But it seems that its case sensitive "microsoft", "Microsoft"

 

Is there anyway I can get rid of that? I dont want to add 2 conditions when i only need one?

 

Debbie

1 ACCEPTED SOLUTION

Create your conditional column exactly as you have been doing, then go to the formula bar and edit it to be something like:

 

= Table.AddColumn(#"Renamed Columns", "MyConditionalCol", each if Text.Lower([MyColumn]) = "microsoftazure" then 1 else 0)

 

The key bit is wrapping Text.Lower() around the column name and making sure the comparitor is also lowercase.

 

image.png

View solution in original post

5 REPLIES 5
DebbieE
Community Champion
Community Champion

Ive come up with a workaround

Create a duplicate column, change everything to lower case and use that. Then hide this column

Hi DebbieE,

 

Could you share some sample data and clarify more info about your expected result?

 

Regards,

Jimmy Tao

Yes, I have a twitter test field. If for example you had

1 MicrosoftAzure

2 microsoftazure

3 Microsoftazure

4 microsoftAzure

 

Currently it seems if you go to New Conditional Column. And Add a If Text Contains microsoftazure  Then 1 You will only get a flag set against 2

 

I dont want to set 4 conditions, which will potentially miss other mixes of capitals and none capitals. The only way around this I could think of is to Duplicate Text. Change to lower case and use this as the basis of the condition

Create your conditional column exactly as you have been doing, then go to the formula bar and edit it to be something like:

 

= Table.AddColumn(#"Renamed Columns", "MyConditionalCol", each if Text.Lower([MyColumn]) = "microsoftazure" then 1 else 0)

 

The key bit is wrapping Text.Lower() around the column name and making sure the comparitor is also lowercase.

 

image.png

DebbieE
Community Champion
Community Champion

Fantastic,

 

Thank you 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.