Forum Discussion
DAX Measure to Check Tag From Different Table
- 4 years ago
I'm not sure what you're doing wrong but it works fine for me.
Do you have relationships between the two tables complicating things?
You might be able to do this with a calculated column like this:
VAR Prod1 = Table1[Product]
RETURN
CONCATENATEX (
CALCULATETABLE (
VALUES ( Table2[Product Code] ),
FILTER ( Table2, CONTAINSSTRING ( Prod1, Table2[Product] ) )
),
Table2[Product Code]
)
However, I'd recommend against models that have columns with multiple values concatenated together. It makes measures harder to write and performance will suffer if your datasets get large.
Hi AlexisOlson,
Thanks for the reply.
This solution is one step closer. Problem is that this works only for those where Table1[Product] = Table2[Product]. Not if the field in Table1[Product] contains more characters, or two products. See below:
As you can see, it does not map for differently filled fields (Bert.5, XMAN_1, Bert.5 etc..)
- AlexisOlson4 years ago
Super User
I'm not sure what you're doing wrong but it works fine for me.
Do you have relationships between the two tables complicating things?
- jereaallikko4 years ago
Helper III
Hi AlexisOlson
As you said, I realized I had an active relationship between the tables that complicated it. Now works fine. Big thanks!