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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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