Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
If you’re new to Qlik Cloud or Qlik Sense, start with this Discussion Board and get up-to-speed quickly.
Few Steps
1- create a master calendar if you dont have one
https://qlikviewcookbook.com/2015/05/better-calendar-scripts/
2- add a column to your master calendar for quarter year
e.g.
'Q' & ceil(month(TempDate) / 3)&'-' & Year(TempDate) AS QuarterYear,
3 - 2 variables to identify current quarter and previous quarter
e.g.
vCurrentQuarter = 'Q' & ceil(month(today()) / 3)&'-' & Year(today())
vPreviousQuarter = 'Q' & ceil(month(addMonths(today(),-3)) / 3)&'-' & Year(addMonths(today(),-3))
4- use the variables in your expressions
e.g.
sum({<QuarterYear={$(vCurrentQuarter)}>}Sales)
sum({<QuarterYear={$(vPreviousQuarter)}>}Sales)