# QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

## Change Qrt Start Date

Hello,

i'm trying to change my default Quarter Month to begin on October instead of January.

i want Q1 = Oct, Nov, Dec but currently have Q1= Jan, Feb, Mar.

Tags (3)
1 Solution

Accepted Solutions
Honored Contributor II

## Re: Change Qrt Start Date

try this

'Q'&If(Month(QuarterStart(TempDate,2))='1',4,Div(Month(QuarterStart(TempDate,2)),3)) as QuarterStartsOct,

6 Replies
MVP

## Re: Change Qrt Start Date

Hi

Try like this

'Q'&If(Month(QuarterStart(Date))='1',4,Div(Month(QuarterStart(Date)),3))

Hope it helps

MVP

## Re: Change Qrt Start Date

If Quarter is all you need, than this formula would probably cut it. In most cases, however, you'll need more than that:

- Fiscal period for October should be 01

- Fiscal YTD calculation needs to begin with October

- Fiscal QTD calculation needs to begin with the corresponding Quarter

For those purposes, I recommend calculating the difference in months between Jan 1 and Oct 1, and calculating a "Fiscal Date" for each one of the calendar Dates. Then, you can use regular Calendar functions, such as Quarter, InYearToDate, etc... for calculating the corresponding Fiscal attributes.

best,

Oleg Troyansky

Not applicable

## Re: Change Qrt Start Date

This is helpful but when i use the above formula Q1 =Apr, May, Jun Rather than Oct, Nov, Dec

MVP

## Re: Change Qrt Start Date

Hi,

Try this

'Q'&Ceil(Num(Month(MonthStart(Max(InvoiceDate), -3))) / 3) As Quarter

Hope it helps

Celambarasan

Not applicable

## Re: Change Qrt Start Date

hi

try this

yearname(date,0,8) as date,

'Q' & ceil(Month(date)/3) as Quarter

from test table

hope this helps you

Honored Contributor II

## Re: Change Qrt Start Date

try this

'Q'&If(Month(QuarterStart(TempDate,2))='1',4,Div(Month(QuarterStart(TempDate,2)),3)) as QuarterStartsOct,