Forum Discussion
Finding if values from multiple columns in table1 exists in one column of table2
- Anonymous6 years ago
Hello RuneStrand
To do this you can use lookupvalue to return true or false for each column in the table. When any of the 4 columns return a non blank the Output will be true else it will be false.
it might not be the prettiest piece of code, but it will do the trick.
Here is the code:
Calculation = IF ( NOT ( ISBLANK ( LOOKUPVALUE ( Table2[ID_Code]; Table2[ID_Code]; Table1[ID_code1] ) ) ) || NOT ( ISBLANK ( LOOKUPVALUE ( Table2[ID_Code]; Table2[ID_Code]; Table1[ID_code2] ) ) ) || NOT ( ISBLANK ( LOOKUPVALUE ( Table2[ID_Code]; Table2[ID_Code]; Table1[ID_code3] ) ) ) || NOT ( ISBLANK ( LOOKUPVALUE ( Table2[ID_Code]; Table2[ID_Code]; Table1[ID_code4] ) ) ); TRUE (); FALSE () )Kind regards
Joren Venema
Data & Analytics Consultant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily.
Hello RuneStrand
To do this you can use lookupvalue to return true or false for each column in the table. When any of the 4 columns return a non blank the Output will be true else it will be false.
it might not be the prettiest piece of code, but it will do the trick.
Here is the code:
Calculation =
IF (
NOT (
ISBLANK ( LOOKUPVALUE ( Table2[ID_Code]; Table2[ID_Code]; Table1[ID_code1] ) )
)
|| NOT (
ISBLANK ( LOOKUPVALUE ( Table2[ID_Code]; Table2[ID_Code]; Table1[ID_code2] ) )
)
|| NOT (
ISBLANK ( LOOKUPVALUE ( Table2[ID_Code]; Table2[ID_Code]; Table1[ID_code3] ) )
)
|| NOT (
ISBLANK ( LOOKUPVALUE ( Table2[ID_Code]; Table2[ID_Code]; Table1[ID_code4] ) )
);
TRUE ();
FALSE ()
)
Kind regards
Joren Venema
Data & Analytics Consultant
If this reply solved your question be sure to mark this post as the solution to help others find the answer more easily.
- RuneStrand6 years agoFrequent Visitor
Anonymous
Thanks! That did do the trick!
All the best 🙂
/Rune