How to get Quarters in a year.

Hi all,

I have a requirement of dividing 12 months in current year into 4 quarters.

Can anyone help me with it?

  Discussion posts and replies are publicly visible

Parents
  • 0
    Certified Senior Developer

    HI, if you want to devide the "Year" In "Quarters" based on "Dates", here is the way to do it: 

    if(
      isnull(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate']),
      null,
      /* Quarter: Concatenate Q and the quarter number */
      "Q" & floor((month(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate'])-1)/3) + 1
      /* Year: Concatenate year */
      & " " & year(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate'])
    )

    INPUT VALUES: 

    OUTPUT:

Reply
  • 0
    Certified Senior Developer

    HI, if you want to devide the "Year" In "Quarters" based on "Dates", here is the way to do it: 

    if(
      isnull(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate']),
      null,
      /* Quarter: Concatenate Q and the quarter number */
      "Q" & floor((month(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate'])-1)/3) + 1
      /* Year: Concatenate year */
      & " " & year(rv!record['recordType!{4d75e90b-cfa1-4109-8430-d517fc558bbb}MMS Meeting.fields.{2e6f1ac9-328d-44df-bf3a-93cc8f6bab07}startDate'])
    )

    INPUT VALUES: 

    OUTPUT:

Children
No Data