Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
mariamovasheli
Contributor III
Contributor III

Comparing Quarters

Hi,

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
brunobertels
Master
Master

Hi

Try this

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

arulsettu
Master III
Master III

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.

Anil_Babu_Samineni

What is the format of QuarterNum ??

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
mariamovasheli
Contributor III
Contributor III
Author

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