Forum Discussion

jaquelinecampbe's avatar
jaquelinecampbe
New Member
3 years ago

LOOKUPVALUE

Power BI Version: 2.112.1161.0 64-bit (December 2022)

 

  1. Table1 contains ID field, never null, data type GUID.
  2. Table2 contains FieldA, FieldB that can match ID field. FieldB more sparse than FieldA but GUIDs will always match Table1[ID]
  3. 1 x active relationship Table1[ID] --> Table2[FieldA], all works as expected.
  4. I attempt to use LOOKUPVALUE(), searching Table1[ID] for Table2[FieldB] and to my surprise it returns blanks.
  5. Input a valid string literal as the item to search for - still returns blanks!!!

I've used LOOKUPVALUE() a number of times in this scenario and it always worked as expected. Re-read documentation on how it works and no concerns for my scenario. There are other options for my solution but I could not believe the results were all blank.

 

Solution:

  1. Change the relationsip Table1[ID] --> Table2[FieldA] to point at Table2[FieldB]
  2. Revert that change back to original state - and problem sovled!!!!

This seeems like a bug to me. Any thoughts?

3 Replies

  • Hi,

    The LOOKUPVALUE() function works even without a relationship.  If you need further help, share some data and show the expected result.

    • jaquelinecampbe's avatar
      jaquelinecampbe
      New Member

      Ashish that has been my experience too and it is exactly what happened in my scenario above.

       

      The issue I describe is that, in this particular case, it only worked after I edited the relationship and then reverted it back to its original configuration.