Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

IF with a field containing multiple values

There's a way to create a calculated variable linked to a condition starting from a field vector-like?

I.E. FIELD_CONDITION = 101,102,103 (this is an input object but this is not so important)

I want to put "A" for every record that have FIELD_SOURCE equal to one of the values in FIELD_CONDITION.

Obviously if I put this forumla: IF(FIELD_SOURCE=FIELD_CONDITION,'A','X')
QV resolve it in this way: IF('101'='101,102,103','A','X')

I wat something like this: IF('101'='101' OR '101'='102' OR '101'='103','A','X')

Thank you

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello,

You can use MATCH function so (untested)

IF(MATCH(FIELD_SOURCE,FIELD_CONDITION), 'A', 'X')
or even maps in load time using ApplyMap function.

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hello,

You can use MATCH function so (untested)

IF(MATCH(FIELD_SOURCE,FIELD_CONDITION), 'A', 'X')
or even maps in load time using ApplyMap function.

Not applicable
Author

MATCH function is perfect: IF(MATCH(FIELD_SOURCE,FIELD_CONDITION)<>0, 'A', 'X')

Thank you,
Bye