Forum Discussion
LOOKUPVALUE
Power BI Version: 2.112.1161.0 64-bit (December 2022)
- Table1 contains ID field, never null, data type GUID.
- Table2 contains FieldA, FieldB that can match ID field. FieldB more sparse than FieldA but GUIDs will always match Table1[ID]
- 1 x active relationship Table1[ID] --> Table2[FieldA], all works as expected.
- I attempt to use LOOKUPVALUE(), searching Table1[ID] for Table2[FieldB] and to my surprise it returns blanks.
- 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:
- Change the relationsip Table1[ID] --> Table2[FieldA] to point at Table2[FieldB]
- Revert that change back to original state - and problem sovled!!!!
This seeems like a bug to me. Any thoughts?
3 Replies
- Greg_DecklerCommunity Champion
jaquelinecampbe Could be, I always had more luck using MAXX(FILTER(...), ...) rather than LOOKUPVALUE.
- Ashish_MathurSuper User
Hi,
The LOOKUPVALUE() function works even without a relationship. If you need further help, share some data and show the expected result.
- jaquelinecampbeNew 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.