Advanced Designer Learning Path is now live! Read More

How to create Quarter column using Processors?

Level 3
How to create Quarter column using Processors?


I want to create Quarter column using Processors but I can't create it.
I have below date and year/month/day column and I want add Quarter column.
==[Sample data]==

Date                year      month     day     Quarter (Expected)
2020/04/01    2020        4          1        1Q
2020/07/01    2020        7          1        2Q
2020/10/01    2020        10          1        3Q
2021/01/01    2021        01          1        4Q ....
==[Sample data]==

Could you please tell me how can I create Quarter column?

Best regards.
Thank you.

0 Kudos
2 Replies


I'm not sure to understand what "processors" means, but I think you can use in prepare recipie the Formula option with if...then statement to create Quarter column (if 1<month<=4 then "1Q" else if.......x3) with month is an integer ?

Level 3

Hi @Tuong-Vi san

Thank you for your prompt reply.

I tried to use IF statement in Formula function from Processors library, and I can successfully create each Quarter value.

if(date_month>=4 && date_month<=6,"1Q",
if(date_month>=7 && date_month<=9,"2Q",
if(date_month>=10 && date_month<=12,"3Q","4Q")))

Yes. I created date_month as integer.
Also "processors" means "Processors library".

Thank you very much for your support!

0 Kudos
A banner prompting to get Dataiku DSS