Forum Discussion
Anonymous
6 years agoNot applicable
DAX Contains with filter condition
Hi, I have 2 tables (TableA and TableB) both have Name fields and TableB has a field called Status. Now, I want to compare both the tables on the Name field. Condition 1: Compare only the Names tha...
- 6 years ago
Anonymous , Try a new column in Table B
new column = if(isblank(countx(filter(TableA, TableA[NAme] =TableB[Name]),TableA[Name])),"False","True")
Anonymous
6 years agoNot applicable
Anonymous
Your dax is check whether the table contains the names in other table. If that is the case, you can try create this column in TableB.
new column = IF([Name] in VALUES(TableA[Name])&&[Status]=TRUE(),"Matched","Not Matched")
If you want to compare names in each row, use this column:
new column = IF([Name]=RELATED(TableA[Name])&&[Status]=TRUE(),"Matched","Not Matched")
Both dax returns the same results with your sample table, but there is a difference if you applied it to real data.
Paul Zheng _ Community Support Team
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.