Forum Discussion
Handling Case Sensitivity in Power Query and Power BI Desktop
- 1 year ago
Hi Balakrishnan_J,
Below the the updated M-query and pbix file attached for your reference:
Hope this helps
Thank you.
Hi Balakrishnan_J ,
Power BI is doing this because it treats text values that only differ by case as the same thing. So "Not Working", "not working", and "NOT WORKING" all get lumped together.
Easy fixes:
Add row numbers to make them unique: In Power Query, add a custom column:
= Table.AddColumn(#"Changed Type", "UniqueComments",
each [Comments] & " (" & Text.From([S.No]) & ")")Use this new column in your visuals instead. Since each one has a different number, Power BI won't group them.
Invisible character trick:
= Table.TransformColumns(#"Changed Type",
{{"Comments", each _ & UNICHAR(8203) & Text.From([S.No])}})This adds an invisible character plus the row number, so they look the same but are technically different.
Model-level fix: Create a calculated column in Power BI:
UniqueComments = [Comments] & " [" & [S.No] & "]"
Best approach: Go with the first one - it's clearest for users to understand what's happening with the case differences.
This is just how Power BI works - it's not really designed to handle case-sensitive text distinctions well in visuals.
If my response resolved your query, kindly mark it as the Accepted Solution to assist others. Additionally, I would be grateful for a 'Kudos' if you found my response helpful.
This response was assisted by AI for translation and formatting purposes.