cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper II
Helper II

LOOKUPVALUE returns the wrong item if multiple result_columnName with different capitalization

Take the following case : 

[Table name STRING_TABLE]

ID_STRING    STRING_NAME     STRING_LANG    STRING

1                   A                           EN                       This is A

2                   B                           EN                       This is B

3                   A                           FR                       Ceci est A

4                   B                           FR                       Ceci est B

5                   A_UPPER               EN                      THIS IS A

 

The mesure 

LOOKUPVALUE(
     STRING_TABLE[STRING];
     STRING_TABLE[STRING_NAME];"A_UPPER";
     STRING_TABLE[STRING_LANG];"EN"
)

 

will return "This is A" 

1 ACCEPTED SOLUTION
Super User I
Super User I

@6mon -

You can review this article https://blog.crossjoin.co.uk/2019/10/06/power-bi-and-case-sensitivity/ for a possible resolution.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

2 REPLIES 2
Super User I
Super User I

@6mon -

You can review this article https://blog.crossjoin.co.uk/2019/10/06/power-bi-and-case-sensitivity/ for a possible resolution.






Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

Proud to be a Super User!



View solution in original post

Interesting read

 

It indeed solved my problem (adding a trailing zero-width space to the second 'identical' entry) but it's a TERRIBLE SOLUTION!!!

Microsoft people, fix this!!

 

And it's worth mentionning the problem is also present in SQL Server Analysis Server. Not only in PowerBI.

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors