Forum Discussion
Upper Case Changed to Lower Case in Data Set but Power BI does not Change
As per our understanding, you've encountered an issue with Power BI where case changes in the source data are not reflected in the data model after refreshing. This behaviour is not a bug; it is by design.
Power Query is case-sensitive, while the main Power BI engine is case-sensitive. For example, "As+", "aS+", "AS+", and "as+" are considered the same value in Power BI. If you have these variations in your data source and in Power Query, during data import into the Power BI dataset, they will all be replaced by one of them. Typically, it will be the first one loaded into the dataset. If "as+" is the first loaded into the dataset, then all subsequent "AS+", "As+", and "aS+" records will be replaced with "as+". However, it doesn't matter what exact case you see in Power BI ("as+", "AS+", "As+", or "aS+"). For the data model (relationships) and DAX comparison operators (e.g., "="), they are not different. While there are case-sensitive functions like EXACT(), you can't have values that are different only by case in one column.
Prefer the Blog: This https://blog.crossjoin.co.uk/2019/10/06/power-bi-and-case-sensitivity/ explains the problem in detail.
Thanks!
Hi.
Yes I implemented those Power Query steps in Transform Data of Power BI Desktop and works....amazingly. You say this works as designed. I can't believe this. This means anyone using Paginated Reports displaying data from the Semantic Model will have case changes. I don't see this as by design. I see this as a carry over issue from bringing SSRS into Power BI. If this was by design you wouldn't need these ridiculous steps to persist case - you'd have a toggle or one command. This needs fixing and is a bug carried over from the port. This is definately not what you would want to happen by design for Paginated Reports.
- johnguilbert2 years agoRegular Visitor
Just to add. The example shown gives adding special characters on end of Lowercase characters. If we only have a few upper case characters will it still work if I added the special case characters to Uppercase characters? Haven't tried this. ** Be warned ** This will break your wrapping of text in a Power BI Report Builder field. The fix is to remove the special characters in the DAX or as I did on the field:
Replace(Fields!YourFieldName.Value, ChrW(8203), "")
This retains case and fixes the wrap issue as problem was getting the correct case into Report Builder initially. Once it's in you can remove these characters. Very messy and something Microsoft SHOULD be fixing.