Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

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" 

2 Replies

    • Anonymous's avatar
      Anonymous
      Not applicable

      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.