Forum Discussion
Weav8060
4 years agoFrequent Visitor
comparing text values in two columns in current row
I can reference the current row value in columns [Col1] to [Col2] in a column calculation, such as [CalcCol] = [Col1] = [Col2] [CalcCol] = [Col1] > [Col2] It works for text too, but how ca...
jppv20
4 years agoSolution Sage
Hi Weav8060 ,
I'm not sure if I understand the question completely, but this might work:
CalcCol = IF(CONTAINSSTRING('Table'[Col1],'Table'[Col2]),'Table'[Col2],BLANK())
Jori
Weav8060
4 years agoFrequent Visitor
thank you jppv20, CONTAINSSTRING() is the one, allowing references to current value in MORE THAN ONE column. Neither FIND() nor SEARCH() allow this, nor does their documentation spell this out unequivocally. I also note CONTAINSSTRING() is not included in this list Text functions (DAX) - DAX | Microsoft Docs . I am still puzzled at DAX documentation... 🙂