Quantcast
Channel: Data Preparation & Blending discussions
Viewing all articles
Browse latest Browse all 4999

Take operator from a field

$
0
0

Hello, I have 3 fields in a data set: 

- value: numeric

- operator: can be <, >, <=, >=

- target: numeric

I want to check if the value is above or below a target based on the operator.  Ideally I could do something like this in a formula:

IF [value] [operator] [target] THEN 1 ELSE 0 ENDIF

example: IF 2 < 3 THEN 1 ELSE 0 ENDIF would yield 1

I can easily build a long expression to check the operator and based on it go in the appropriate case with that operator, but I'm wondering if there is a way to read the operator field and use it instead to simplify the formula code.

Thanks!


Viewing all articles
Browse latest Browse all 4999

Trending Articles