Forum Discussion
Kagliostro
2 years agoFrequent Visitor
How to match comma separated cells values in two different columns and return missing values
Hi Everyone, I would like to use DAX to evaluate names differences between two columns of same table. The result will be displayed in a third column. Therefore given column A - Column B I should get...
lbendlin
Super User
2 years agoDo just the EXCEPT and feed the result into the slicer.
Note: this needs to be a calculated table.
Kagliostro
2 years agoFrequent Visitor
I think I am missing something....
SME_MANCANTE =
VAR PathA = SUBSTITUTE( IA_Assigned_to[ColumnA], ",", "|" )
VAR PathB = SUBSTITUTE( IA_Assigned_to[ColumnB], ",", "|" )
VAR TableA = SELECTCOLUMNS(GENERATESERIES( 1, PATHLENGTH(PathA)+1 ),"Value",PATHITEM( PathA, [Value] ))
VAR TableB = SELECTCOLUMNS(GENERATESERIES( 1, PATHLENGTH(PathB)+1 ),"Value",PATHITEM( PathB, [Value] ))
VAR __Missing = EXCEPT( TableA, TableB )
VAR __Result = CONCATENATEX( __Missing, [Value], "," )
RETURN __Result- lbendlin2 years ago
Super User
SME_MANCANTE = VAR PathA = SUBSTITUTE( IA_Assigned_to[ColumnA], ",", "|" ) VAR PathB = SUBSTITUTE( IA_Assigned_to[ColumnB], ",", "|" ) VAR TableA = SELECTCOLUMNS(GENERATESERIES( 1, PATHLENGTH(PathA)+1 ),"Value",PATHITEM( PathA, [Value] )) VAR TableB = SELECTCOLUMNS(GENERATESERIES( 1, PATHLENGTH(PathB)+1 ),"Value",PATHITEM( PathB, [Value] )) RETURN EXCEPT( TableA, TableB )- Kagliostro2 years agoFrequent Visitor
It does not work, the error says "Specified a table with more than a value while a single value is expected" (apologies the error message is in Italia I did try to translate the best I could)
- lbendlin2 years ago
Super User
As I said this needs to be a CALCULATED TABLE, not a calculated column, and not a measure.