Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Previous year quarter

Hello all,

     I need to calculate count for previous year quarter where Year is in format =2014-2015 like current year is 2014-2015 and quarter Q1 ,i need to calculate count for year 2013-2014 quarter Q1??

4 Replies
MK_QSL
MVP
MVP

From which month your quarter starts? question is because need to know whether you are using Financial Year or not !

senpradip007
Specialist III
Specialist III

In the Master Calendar you can create Calendar Year, Financial Year, Financial Month, Financial Quarter.

you can use this script:

Load
 
Dual([Calendar Year]-1 &'/'& [Calendar Year], [Calendar Year]) as FYear,         
  Dual([Calendar Month], fMonth) as FMonth,          
  Dual([Calendar Year]&'-'&'Q'&Ceil(fMonth/3), [Calendar Year]*100+Ceil(fMonth/3)) as FQuarter
  CalendarYear,
  CalendarMonth

Resident Fact;

Not applicable
Author

April month ,ya i am using financial year

lironbaram
Partner - Master III
Partner - Master III

hi

i would suggest that for future calculation , you would create a numeric field for year

for example 2013-2014 will be 2013 , and 2014-2015 will be 2014

here are two examples

1. using numeric fields

   sum({<Year={"$(=max(Year)-1)"}>} Sales)

2. using your field

  sum({<Year={"$(=num(left(MaxString(YEAR),4))-1 & '-' & left(MaxString(YEAR),4))"}>} Sales)