Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
How to properly wright the script which will create new column and add data as followed: check 2 columns ([name A] and [name B] - ALWAYS only one of them might have data and NEVER both, sometimes both columns might be empty) and add it to created new column
I am sure it is simple IF statement, but I am not sure how to check if field is empy.
Thank you,
Andrzej
Or the alternative if the above doesn't work would be:
If(IsNull([Name A]), [Name B], [Name A]) as NewColumn
Best,
S
you can do something like this:
LOAD yourOtherFields,
Alt([Name A], [Name B]) as NewColumn
Resident/From XYZ;
This would work in your situation where only one or the other will have a value.
HTH
Best,
S
Or the alternative if the above doesn't work would be:
If(IsNull([Name A]), [Name B], [Name A]) as NewColumn
Best,
S
The first solution didn't work for me...
I changed the second solution a little but basicaly "IsNull" this is what i was looking for.
if(not isNull(NameA), NameA, if(not isnull(NameB), NameB)) as [New Name],
I guess the second one worked then, since you marked it as a correct answer.
Best,
S