Forum Discussion
DAX query across 3 tables
- 3 years ago
Hi TAD80 can you try this formula
= IF (
NOT ( ISBLANK ( LOOKUPVALUE ( Table2[Product Name], Table2[Product Name], [Product Name] ) ) ),
LOOKUPVALUE ( Table2[Cost Centre], Table2[Product Name], [Product Name] ),
IF (
NOT ( ISBLANK ( LOOKUPVALUE ( Table3[Product Name], Table3[Product Name], [Product Name] ) ) ),
"N/A",
""
)
)
The above formula checks if the ‘Product Name’ exists in Table 2. If it does, then it populates the ‘Owner’ column with the corresponding ‘Cost Centre’.
If it doesn’t exist in Table 2, then it checks if it exists in Table 3.
If it does, then it populates the ‘Owner’ column with “N/A”.
If it doesn’t exist in either table, then it leaves the ‘Owner’ column blank.Please let me know if this work.
Thanks
@ dallasbabatunde That works! Thanks so much.