Forum Discussion
Anonymous
3 years agoNot applicable
IF with multiple Contains
Similar to the below, I'm trying to make an IF statement with Contains but I am trying to count the times 2 (or more) affiliates appear in a customers click path together. IF CONTAINS WITH MULTIP...
- 3 years ago
Anonymous
Are you looking for something like this?FilterMeasure = COUNTROWS ( FILTER ( Orders, VAR String = Orders[Path_Taken] VAR Items = SUBSTITUTE ( String, " -> ", "|" ) VAR Length = COALESCE ( PATHLENGTH ( Items ), 1 ) VAR T = GENERATESERIES ( 1, Length, 1 ) RETURN ISEMPTY ( EXCEPT ( VALUES ( Stations[Station] ) , SELECTCOLUMNS ( T, "@Station", PATHITEM ( Items, [Value] ) ) ) ) ) )
tamerj1
3 years agoCommunity Champion
Anonymous
Are you looking for something like this?
FilterMeasure =
COUNTROWS (
FILTER (
Orders,
VAR String = Orders[Path_Taken]
VAR Items = SUBSTITUTE ( String, " -> ", "|" )
VAR Length = COALESCE ( PATHLENGTH ( Items ), 1 )
VAR T = GENERATESERIES ( 1, Length, 1 )
RETURN
ISEMPTY (
EXCEPT (
VALUES ( Stations[Station] ) ,
SELECTCOLUMNS ( T, "@Station", PATHITEM ( Items, [Value] ) )
)
)
)
)Anonymous
3 years agoNot applicable
Works perfectly, thank you so much for your help!