Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a column with values '1', ' 2', '3'
my table output is like:
NAME FLAG
AA 1
BB 3
CC 2
DD
How Can i have an output like
NAME FLAG RESULT
AA 1 IN
BB 3 OUT
CC 2 OVER
DD EMPTY FLAG
Hi,
you can do it in diffrent ways. That should be the easiest:
IF( FLAG = 1, 'IN', IF(FLAG = 2,'OVER', IF(FLAG = 3,'OUT','EMPTY FLAG')))
Best regards
dash
Hi,
You can use nested IF condition:
IF( FLAG = 1, 'IN', IF(FLAG = 3,'OUT', IF(FLAG = 2,'OVER','EMPTY FLAG')))
Output:
Hope this helps,
help user find answers ! don't forget to mark a solution that work for you and click the like button!
load
NAME,
FLAG,
IF(FLAG=1, 'IN', IF(FLAG=2, 'OVER', IF(FLAG=3, 'OUT', 'EMPTYFLAG'))) as RESULT
Inline
[
NAME, FLAG
AA, 1
BB, 3
CC, 2
DD,
];
I hope this will work for u.
Please accept the solution if u liked it
Try this
LOAD
NAME,
FLAG,
IF(ISNULL(FLAG), 'EMPTY FLAG', MATCH(FLAG, '1', '2', '3'), 'RESULT') AS RESULT
FROM
[your_table];
For better performance try mapping load