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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
Stef76
Frequent Visitor

MID and other Text functions randomly do unintentional capitalization

I added a simple custom column to a table. Using MID text function I get the values as of position 4 in the original column. An Example value could be "52 Bikes" which should lead to "Bikes".

This works fine mostly, but in some cases I get a capitalized value "BIKES" instead. This seems pretty random, for some column values it even depends on the number of characters I get from the original value, so MID("52 Bikes", 4, 3) might lead to "BIK", but MID("52 Bikes", 4, 5) becomes "Bikes". Is this intended behaviour and why?? 

1 ACCEPTED SOLUTION
lbendlin
Super User
Super User

Please remember that for the most part Power BI / DAX is NOT case sensitive.  If you have both  "52 Bikes"  and "40 BIKES"  in your data then the function will randomly pick one of the spellings when it forcibly groups the results. 

 

You can test that by simply creating a table like this

 

Table 2 = {{"A"},{"a"}}
 
and then putting the Value into a table visual
 
lbendlin_0-1716513486294.png

 

Note: Power Query is case sensitive.

 

 

 

View solution in original post

2 REPLIES 2
Stef76
Frequent Visitor

Thnx that makes sense in this context and I was able to solve by adding the column in the query.

lbendlin
Super User
Super User

Please remember that for the most part Power BI / DAX is NOT case sensitive.  If you have both  "52 Bikes"  and "40 BIKES"  in your data then the function will randomly pick one of the spellings when it forcibly groups the results. 

 

You can test that by simply creating a table like this

 

Table 2 = {{"A"},{"a"}}
 
and then putting the Value into a table visual
 
lbendlin_0-1716513486294.png

 

Note: Power Query is case sensitive.

 

 

 

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! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.