Hi Rahul, Please confirm if the below mentioned nested IF formula is the correct equivalent to the CASE statement that you had discussed in the video. I have used IFNULL in case one of the values are not defined here I have commented out the Dec month. Formula for DatePart field is DATEPART('month', [Order Date]) IFNULL( IF [DatePart] = 1 THEN 'Jan' ELSEIF [DatePart] = 2 THEN 'Feb' ELSEIF [DatePart] = 3 THEN 'Mar' ELSEIF [DatePart] = 4 THEN 'Apr' ELSEIF [DatePart] = 5 THEN 'May' ELSEIF [DatePart] = 6 THEN 'Jun' ELSEIF [DatePart] = 7 THEN 'Jul' ELSEIF [DatePart] = 8 THEN 'Aug' ELSEIF [DatePart] = 9 THEN 'Sep' ELSEIF [DatePart] = 10 THEN 'Oct' ELSEIF [DatePart] = 11 THEN 'Nov' //ELSEIF [DatePart] = 12 THEN 'Dec' END, 'Not Defined') Regards, Deepak.
Thank you🙏 for such helpful videos.
Thankyou Lakshmi :)
You are doing a great job.😀
Thankyou Sanket 🤝
Hi Rahul,
Please confirm if the below mentioned nested IF formula is the correct equivalent to the CASE statement that you had discussed in the video. I have used IFNULL in case one of the values are not defined here I have commented out the Dec month.
Formula for DatePart field is DATEPART('month', [Order Date])
IFNULL(
IF [DatePart] = 1 THEN 'Jan'
ELSEIF [DatePart] = 2 THEN 'Feb'
ELSEIF [DatePart] = 3 THEN 'Mar'
ELSEIF [DatePart] = 4 THEN 'Apr'
ELSEIF [DatePart] = 5 THEN 'May'
ELSEIF [DatePart] = 6 THEN 'Jun'
ELSEIF [DatePart] = 7 THEN 'Jul'
ELSEIF [DatePart] = 8 THEN 'Aug'
ELSEIF [DatePart] = 9 THEN 'Sep'
ELSEIF [DatePart] = 10 THEN 'Oct'
ELSEIF [DatePart] = 11 THEN 'Nov'
//ELSEIF [DatePart] = 12 THEN 'Dec'
END,
'Not Defined')
Regards,
Deepak.
Hi Deepak, yes you can write like this as well. it should give same results