Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Previous year quater data display

Dear all,

I want to do the calculation of sales data by quarter to data means quarter to date of this year and quarter to date of prev year.

I am getting quarter to date of this year data but dont know how to display quarter to dat of previous year.

Please help its urgent.

Regards,

Pranav

4 Replies
brenner_martina
Partner - Specialist II
Partner - Specialist II

Hi, Pranav,

you can use the function InQuarterToDate.

Not applicable
Author

Dear Martina,

through InQuarterToDate() only i am calculation QTD and PQTD but my PQTD it is CVomming as this year p[revious quarter but i want previous year same Quarter.

Ex: If my QTD is QTR2 of 2011 then my PQTD should be QTR2 of 2010.

My calculation with InQuarterToDate() is :

IF(InQuarterToDate(PeriodDate,today(),0),1,0) as QTD_VoyStart,
IF(InQuarterToDate(PeriodDate,today(),-1),1,0) as PQTD_VoyStart,

but the PQTD_VoyStart givse this year previous Qtr.

Please Suggest a answer .

Thanks

regards,

Pranav

brenner_martina
Partner - Specialist II
Partner - Specialist II

Dear Pranav,

does set analysis work like this, if you calculate in calendar quarter like:

Num(Ceil(Month(Datefield)/3)) as Quarter

Sum({<Year={$(=Only(Year-1))},Quarter={$(=Quarter)}>} Field)

Not applicable
Author

Dear Martina,

May be the Setanalysis will work i have not Checked it,

I have done the above code in Calender in Script and it works fine.

Will try for setanalysis also and let u know.

Thanks

regards,

Pranav