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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
msylv13
Helper I
Helper I

LOOKUPVALUE not returning result for matching data

Hello, 

 

I am trying to use the LOOKUPVALUE function across two tables to return a result of "Published" or "Unpublished." In data table 'Sales Data' I have a cell value 401211_US - Ferguson that is also found in data table 'Sept 2022 Publication Data'. However, the LOOKUPVALUE function is not returning a result despite having an exact match and no duplicate values that would cause an unexpected result. I have also checked that there are no unwanted spaces as both cell values have LEN of 20. Snapshots of the two tables and DAX expression below:

msylv13_0-1664379496287.pngmsylv13_1-1664379611556.png

 

And the DAX expression:

P_Status = lookupvalue('Sept 2022 Publication Data'[Published],'Sept 2022 Publication Data'[Mat_Distributor],[Mat_Salsify],"Unpublished")
2 REPLIES 2
ryan_mayu
Super User
Super User

it looks like the result is correct. the length of 401211_US 0 Ferguson is 20 in both tables.

Could you pls provide the sample data (not in screenshot) and the expected output?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




It is not the expected result as the DAX expression should produce a result of "published." I was able to produce the correct result by changing the relationship between tables to [Mat_Salsify] and [Mat_Distributor]. It would still be good to know why the DAX expression did not produce the desired result before changing the relationship. 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.