How to Determine Year Quarter based on Due date

Raysen16

New Member
Hi Everyone,

I need some help . I have an outcome due date column in excel but i need to update in excel the due date falls under which quarter of the year.
For example the due date is on 27th April 2021 and this falls under Quarter 2 of the year. I tried using loop and calc stage to achieve this but i could not find the right way to do this. Can someone help me

1/1/2021 till 31/3/2021 : Quarter 1
1/4/2021 till 30/6/2021 : Quarter 2
1/7/2021 till 30/9/2021 : Quarter3
1/10/2021 till 31/12/2021 : Quarter 4
 

Attachments

  • Expression.PNG
    Expression.PNG
    18.1 KB · Views: 2
  • Process.PNG
    Process.PNG
    38.3 KB · Views: 2

Pete_L

Active Member
Why are you using a loop here? The loop doesn't appear to actually save the Quarter in a data item, so you won't be able to store it back to Excel. Of course, the process steps you've shown could just be an out of context example, so forgive me if that's the case.

I suggest that you use a multi-calc stage instead of the loop/choice combination. The 4 expressions you already have in your Choice Start stage look OK (assuming the start/end data items are Date data types), and they can be copied over to make 4 rows in a multi-calc stage. For each expression row in the multi-calc, store the result in a data item called "Quarter" (data type = Date). Then, when it is time to write the Quarter back to Excel in your Process, write the value of Quarter.

Hope this helps.
 

Raysen16

New Member
Thank You Pete. I have removed the loop stage and improvise the process . It works good now , below is the screenshot of what i have done.
 

Attachments

  • Choice 1.PNG
    Choice 1.PNG
    28.9 KB · Views: 2
  • process.PNG
    process.PNG
    64.6 KB · Views: 2
Top