It seems we have a very strange bug with the LOOKUPVALUE-function in PowerBI.
The following Dax-column in table target_table
is working for 99% of our cases, but there are 2 cases which do not work, even so the IDs do exist in the target field it returns us blanks, if so source_table[Name
is not.
Name_User = LOOKUPVALUE( source_table[Name],
source_table[code_user],
target_table[code_user])
The id-field is just a concatenation of 2 number-fields in both tables, based on the same concatenation:
code_user = CONCATENATE(CONCATENATE([CompanyID],"_"),+[PersID])
We did check manually if there is a line in source_table
with the code_user
, and there is actually exactly 1 line for both cases, both having a value in the Name
field. Unfortunately the lookupvalue-function just returns blanks for the 2 cases. To recall, every other case is working, so basically the lookup-call is tested and working.
Sometimes the following variables get underlined in the lookup-call:
source_table[Name]
, telling us: "Parameter is not the correct type."
For source_table it underlines code_user
, telling us: "Cannot find name '[code_user]'"
.
The function LOOKUPVALUE relies on relationships. In case of problems, one should verify on the relationships between the tables concerns.