Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
PGAT
Helper III
Helper III

Conditional Column - Else if

Hi Experts, I thought I had this covered and after some months, i realised I have overlooked the mistake on Conditional Column.  I have these dates columns - Start date, End Date, Shpt ETD, Shpt ETA...  and by job type, I set the conditional column to pick the date into the column (R-Date I call it).  If the job is "OB", it will take Shpt ETD.  Else, Start Date.  Somehow, when Shpt ETD is null, it does not take the Start date. 

 

R-date table.jpg

 

R-Date Conditional Column.png

I attach a screen grab of the file and conditional column setting. 

 

https://atmms-my.sharepoint.com/:x:/g/personal/patrick_goh_atmms_onmicrosoft_com1/Efl6QmhoN31Enj-1QE...

 

I will very grateful if someone can help me to understand "Else if" in this issue here.  Thanks.

 

 

Sincerely.

Patrick 

1 ACCEPTED SOLUTION
CheenuSing
Community Champion
Community Champion

Hi @PGAT ,

 

From your statement of requirement , Somehow, when Shpt ETD is null, it does not take the Start date. 

You have only specified the condition for JobType Equals OB then Shpt ETD, but does not specify that if Shpt ETD is null take Start Date.

 

Can you post this step in Power Query here to make changes.

 

Cheers

 

CheenuSing 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

View solution in original post

5 REPLIES 5
CheenuSing
Community Champion
Community Champion

Hi @PGAT ,

 

From your statement of requirement , Somehow, when Shpt ETD is null, it does not take the Start date. 

You have only specified the condition for JobType Equals OB then Shpt ETD, but does not specify that if Shpt ETD is null take Start Date.

 

Can you post this step in Power Query here to make changes.

 

Cheers

 

CheenuSing 

Did I answer your question? Mark my post as a solution and also give KUDOS !

Proud to be a Datanaut!

Hi CheenuSing,

 

Thanks.  I have thought that the "ELSE" = Start Date will apply if the rule above does not apply.   How do I use "ELSE"?

 

I added the last two steps as per your advice.  The "null" in R-Date has gone down in numbers but still I cannot figure out why some records are null.

  1. OB = ETD
  2. ETD = null = Take Start Date
  3. R-Date = Did not show the Start Date

 

 

R-Date2.jpg

 

R-DateTable.jpg

Hi CheenuSing, further to my reply below, I thought I may have done it wrong.  I tried moving the condition up to the right place but despite the shift, i still cannot get "start date" when ETD = null.  Appreciate your advice to this, and also your guidance on how to use "ELSE" at the end of it.  Thanks. 

 

R-Date3.jpg

Hi CheenuSing, I got it now. I moved the rule (ETD=null, use Start) to the 1st rule.  Thank you!

Hi,

 

If the first reply has solved your issue, please mark it as a solution for others to see.
Thanks!

 

Best Regards,

Giotto

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.