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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. 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
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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