Forum Discussion
Power BI automatically normalizing text casing during data load
Hello everyone,
I am building a Power BI connector that loads data from a server and have observed an unexpected behavior with text values.
For example, the source data contains the following values in the City column:
- PunE
- Pune
- pune
- PUNE
However, after loading the data into Power BI, all values are displayed as PunE, matching the casing of the first occurrence.
It appears that Power BI treats text values as case-insensitive and preserves the casing of the first occurrence of a particular text value.
My questions are:
- Is this the expected behavior of Power BI during data loading/modeling?
- If this is expected behavior, is Microsoft/Power BI working on any changes or improvements to preserve the original casing of text values?
- Is there any way to preserve the exact casing of each source value?
- Since I am developing a connector that retrieves data directly from a server, are there any connector-side measures or transformations I can apply to prevent this behavior?
I have attached screenshots illustrating the source data and the resulting Power BI output.
Any guidance on how this can be handled at the connector level would be appreciated.
Hi KumbharM ,
This is the expected behavior.
You can either apply formatting to the excel file, or use a PowerQuery function like text.Upper to make the change when loading data:
https://learn.microsoft.com/en-us/powerquery-m/m-working-with-case
Also see:
6 Replies
- KumbharMRegular Visitor
Apologies I haven't attached scrrenshots above there please refer this message for the images
Excel Data-Power BI data loaded from same excel-
- djurecic
Super User
Hi KumbharM ,
This is the expected behavior.
You can either apply formatting to the excel file, or use a PowerQuery function like text.Upper to make the change when loading data:
https://learn.microsoft.com/en-us/powerquery-m/m-working-with-case
Also see:
- ryan_mayu
Super User
Yes, so far that's the expected output. Now what we can do is to add some special symbol to distinguish them
- maruthisp
Super User
Hi KumbharM,
Data types in Power BI - Power BI | Microsoft Learn
Please check the above link for Data Types in Power BI.
Best Regards,
Maruthi
LinkedIn - http://www.linkedin.com/in/maruthi-siva-prasad/
X - Maruthi Siva Prasad - (@MaruthiSP) / X - v-kathullac
Community Support
Hi KumbharM ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
Regards,
Chaithanya - v-kathullac
Community Support
Hi KumbharM ,
As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
Regards,
Chaithanya.