Forum Discussion
Lookupvalue not working between 2 tables
- 4 years ago
Try this instead...
IF('Master Plant & Product'[Merged Plant & Product] IN DISTINCT('SKU by line - Official'[Merged Plant & Product]), 1,0)I may have typo'd your column names so double check those.
I think the RELATED function would be more useful given you already have a relationship setup.
Checkout this link.
- KNP4 years agoSuper User
Can you double check the column name in the SKU table?
It isn't recognising it for some reason.
- KNP4 years agoSuper User
Just did some testing/reading.
Looks like the RELATED (at least in this scenario) only works on the table on the 'many' side of the relationship. So in your case, the column would need to be added to the SKU table I believe.
There will be a better way. Going to do some more investigation.
- KNP4 years agoSuper User
Try this instead...
IF('Master Plant & Product'[Merged Plant & Product] IN DISTINCT('SKU by line - Official'[Merged Plant & Product]), 1,0)I may have typo'd your column names so double check those.
- o593934 years agoPost Prodigy
Wow KNP
It worked! so the distinct in your dax basically converted the duplicated values to unique ones correct?
Thank you so much 🙂
- KNP4 years agoSuper User
It just gets the unique values of that column from the SKU table to compare with the Master table. So not to compare every row.
At least, that's how I understand it to work.
Glad I could help, especially since my DAX knowledge is a work in progress. 😁