Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
Hi All,
I'm looking at creating a custom column based on the contents of 2 other columns. I want to say:
If column 1 and column 2 are both blank, display "outcome 1" in the column
If column 1 is not blank and column 2 is blank, display "Outcome 2" in the column
If Column 2 is not blank, display "Outcome 3" in the column.
I have written this:
if(ISBLANK [Column1] and ISBLANK[Colmun2], "Outcome1",
if(ISNOTBLANK [Column1] and ISBLANK [Column2],"Outcome2",
if(ISNOTBLANK[Column2], "Outcome3" ))))
But I'm getting an error under the "Outcome1" section. Any ideas?
Hi @hayleypnch ,
=if Text.Length([Column1])=0 and Text.Length([Column2])=0 then "Outcome1" else if Text.Length([Column1])>0 and Text.Length([Column2])=0 then "Outcome2" else "Outcome3"
New Column =
SWITCH (
TRUE (),
[Column1] = BLANK ()
&& [Column2] = BLANK (), "Outcome1",
[Column1] <> BLANK ()
&& [Column2] = BLANK (), "Outcome2",
[Column2] <> BLANK (), "Outcome3"
)
Best Regards,
Eyelyn Qin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Here is a column expression that should work.
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.