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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

Reply
rbowen
Helper I
Helper I

BI Desktop Not Recognizing Difference Between Upper and Lower Case Letters

Greetings All - 

 

I'm working with a data table containing some account information. Part of that information is account codes that contain a main account number, and a sub account number. The sub account determines the location and store name of where a sale was made. The sub account number contains of mix of letters and numbers, for example H00 or h00. For this example, the upper case H and lower case h refer to two different sites and store names - yes, it's a terrible numbering scheme but it's what I have to work with. PowerQuery can tell the difference between these, but BI Desktop can't and it's messing up my sales data calculations. Desktop thinks the the two different sub accounts are the same and summing them together instead of separately. There's probably a way to remedy this with unicode in PowerQuery but I'm unclear as to how that would be done.  Any suggestions on how to do this?

 

Thank you

 

rbowen_0-1693505204600.png

 

 

1 ACCEPTED SOLUTION

oh my bad here use this https://invisibletext.com/
insetead of the u+200e just copy this text in this link

View solution in original post

8 REPLIES 8
eliasayyy
Super User
Super User

hello @rbowen 

lets say you have this table 

annonymous1999_0-1693568624550.png

 

annonymous1999_1-1693568652734.png


as you see it is adding them up together the lowercase and uppercase, 

a wrokaround is to add an invisible space to the text with lower cases do this


add a new custom column 

if 
 Text.StartsWith([Data], Text.Lower(Text.Start([Data], 1))) then  [Data] & "<u+200e> "  else [Data]

 

annonymous1999_2-1693568713998.png

 

annonymous1999_3-1693568722101.png

 



Thanks Anon, this appears to be getting closer, but I'm not getting the clean lower case values showing in your example. Here's the M code I'm using:

 

=if
Text.StartsWith([SubAccountNumber], Text.Lower(Text.Start([SubAccountNumber], 1))) then [SubAccountNumber] & "<u+200e> " else [SubAccountNumber]

 

And what I end up with is this:

 

rbowen_0-1693586618360.png

 

The SubAccountNumber reference column is formatted as text, as is the new column. The reference column also contains straight numeric values (100, 200, 300, etc) and I'm wondering if that's throwing off the calculations for the new column - although, as I said, the reference column is formatted as text.  Am I missing something?

oh my bad here use this https://invisibletext.com/
insetead of the u+200e just copy this text in this link

That did the trick!  Thank you.

Idrissshatila
Super User
Super User

Hello @rbowen ,

 

so you click on the column you want to have them all upper case and then under transform the is a format option = > you click on it and then click on upper case and it will make it happen.

Idrissshatila_0-1693506867506.png

Idrissshatila_1-1693506895686.png

 

If I answered your question, please mark my post as solution, Appreciate your Kudos 👍

Follow me on Linkedin
Vote For my Idea 💡

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Unfortunately, I can't do that. I have to maintain the upper/lower case mix because they reference different locations based on the letter case. There are multiple combinations of this with different letters as well - i.e., A/a, B/b, I/i, etc. Is there a way in PowerQuery to create a custom column of the sub account column using Unicode?

@rbowen In short, yes. I demonstrate the technique in this video:


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Yikes!  While I completely the 'case insensitivity' thing is ridiculous (much like the 'additivity' issue), the solution in your video is well beyond my BI/PowerQuery kung fu - especially given the sheer number of alphanumeric combinations in my data. Was really hoping there would be a relatively straightforward way to do this - surely there's a way in PowerQuery to take a column and either convert it's existing values to unicode, or create a new column based on the original and parse those values into unicode. It's becoming increasingly clear I may be indulging in wishful thinking. Perhaps I need to investigate doing the conversion on the front end with SQL. 

Helpful resources

Announcements
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel1

Power BI Monthly Update - May 2024

Check out the May 2024 Power BI update to learn about new features.