Forum Discussion
sammyboi
3 years agoNew Member
Creating a conditional column with null value
Hi there! I am trying to create a conditional column to return values based on the following logic: if column a is null, then column a should equal to column b if column a and column b are bo...
grantsamborn
3 years agoSolution Sage
Based on your description:
if column a is null, then column a should equal to column b
if column a and column b are both null, then column a should equal column c
all else should equal to column a
I'm guessing that you mean something like this. If not, I don't understand.
if column a is null, then RESULT should equal column b
if column a and column b are both null, then RESULT should equal column c
else RESULT should equal to column a
If I do understand, is this what you are looking for?
z=
IF(
ISBLANK( [ColumnA] ),
IF(
ISBLANK( [ColumnB] ),
[ColumnC],
[ColumnB]
),
[ColumnA]
)
(If the difference is between NULLs and BLANKs, maybe PowerQuery would be the place to make the substitution.)