Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

Comparing Quarters


I need To compare Quarters Like 2018 quarter to 2017 4th Quarter.

Sum({< Year={'$(=max(Year))'}, QuarterNum={"<=$(=(max(QuarterNum)))"}>}Volume)

That is Formula  For 2018 Quarter and How can I calculate 2017 4th quarter?  Can you Please Help me

4 Replies
Valued Contributor

Re: Comparing Quarters


Try this

Sum({< Year={'$(=max(Year)-1)'}, QuarterNum={"<=$(=(max(QuarterNum)))"}>}Volume)

Honored Contributor III

Re: Comparing Quarters

may be like this

Sum({< Year={'$(=max(Year))'}, date={">=$(=Num(MonthStart(Max(date), -14)))<=$(=addmonths(Max(date), -11))"}>}Volume)

in second part will give you the Q4 from 2017. change the number inside the set to control the month.

Re: Comparing Quarters

What is the format of QuarterNum ??

New Contributor III

Re: Comparing Quarters

Integer, And I need This Formula To change when I select q3 of 2017 to compere it with q2 of 2017