Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Compare two columns in different Tables using DAX

I ahve two columns in tweo different tables connected -M to M relationship, and I would like to compare the text from the columns to see which ones match or not. I tried a "solution" given here some time ago, but is not working properly. It doesn't diferentiate between match/no match, giving only one value. Here is the script used: 

Equal value seq =
CALCULATE(
var __MWseq = SELECTEDVALUE(PM_details[sequencedescription])
var __REFseq = SELECTEDVALUE('Reference Table'[Description of Task Sequence])
return
if(__MWseq =  __REFseq, 1, 0),
USERELATIONSHIP(PM_details[idassetpm], Assets_extended[__id])), and the result. What could fix the issue! Many thanks !
Some records match, but the formula doesn't show it.
  • Anonymous's avatar
    Anonymous
    3 years ago

    I fixed it! I used a measure instead of calc. column and applied formatting. It works. 

1 Reply

  • Anonymous's avatar
    Anonymous
    Not applicable

    I fixed it! I used a measure instead of calc. column and applied formatting. It works.