Hi all,
i want to compare 3 string columns named source 1, source 2 and source 3 as below :
if at least one value from these 3 columns is different from the other ones, I want to create a column and mark it as "to be defined".
if all the values are the same (equals) I want to copy the value in the new column.
If a value is empty and the other ones are equal (line 4 for example) I want to copy the equal value to the new column.
finally, if all values are empty I want to mark it as "to be defined".
is it possible to do that dynamically ?
Thanks in advance
Solved! Go to Solution.
Hi @Broly ,
Looks like couple of IF ELSE statements should help you out here.
E.g. IF Source1 = Source2 and Source2 = Source3 then Source1
elseif isnull(source1) and Source2 = Source3 then source2
else "to be defined"
endif.
You will need to cover all possible cases in your IF ELSE statements and I believe you should be able to achieve the desired result.
Regards,
Shreyansh Rathod
Hi @Broly
As @shreyanshrathod mentioned you could do an IF statement, however you could make this dynamic by transposing the data and running some checks.
Works fine, thank you for your help !
User | Count |
---|---|
52 | |
27 | |
25 | |
24 | |
21 |