Forum Discussion
Find columns from one table in another table
Hello,
i'm trying to find columns of 1 table on a 2nd table, but i'm struggling because i can't seem to use distinct or values with text operators (2nd column can be slightly different, as you'll see), and i also was trying to use addcolumns and summarize in a variable but i don't know how to use it after on the Calculate's Filter.
So what i pretend is to count table1\column1 in table2\column1, the detail is that :
- it could not exist, as AA-00004
- it can exist exactly equal or with a variation on the string (AA-00001 with AA-00001 and AA-00001--1)
Thanks in advance
Anonymous
Then use
= SUMX ( VALUES ( table1[Column1] ), IF ( SUMX ( VALUES ( table2[Column1] ), IF ( CONTAINSSTRING ( table2[Column1], table1[Column1] ), 1 ) ) > 0, 1 ) )
9 Replies
- AnonymousNot applicable
Hello tamerj1 ,
i was trying now to do something more similar to you, as the idea is just to count once, but:
1) shouldn't the 1st SUMX be done over Table1, as we want to count from there?
2) can't i simply create a measure with the code you kindly shared and drag it to the screen? An error is appearing.
Thanks and Regards- tamerj1
Community Champion
The first Values is table1 the 2nd values is table2. Please copy the same code in my last reply
- AnonymousNot applicable
i was trying now to do something more similar to you, as the idea is just to count once, but:
1) shouldn't the 1st SUMX be done over Table1, as we want to count from there?
2) can't i simply create a measure with the code you kindly shared and drag it to the screen? An error is appearing.
Thanks and Regards