Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

QoQ Question

Question (apologies for long post)QoQ.PNG.png

I have the above chart showing year over year data in quarterly views. Current year per above has only Q1 and Q2, so Q3 and Q4 is showing for previous year. The current view above has ability to compare only the current/passed quarters of a current year.  What user want is to be able to view or compare of last 4 quarters for example in Jan 2014, it should display the following

Q114 vs. Q113

Q413 vs. Q412

Q313 vs. Q312

Q213 vs. Q212

To further describe using the chart above,  we are so far in Q2. This is what should be displaying QoQ2.PNG.png

The above chart is showing Q1 and Q2 of current year (since this are the only quarters so far) and comparing to the Q1 and Q2 of 2013. Q4 and Q3 of 2013 compared to Q4 and Q3 of 2012. Hence the comparison is that of last 4 quarters, compared to the same quarter of precious year.

When 2013 year is selected it should show Q1,Q2,Q3,Q4 of 2013 compare to Q1,Q2, Q3, Q4 of 2012.  How do I achieve this?

I am currently using fiscalquarter (Q1..Q4 formart) as dimension and for expression my set analysis is:

1st expression (previous 4 quarters):

sum({1<QuarterID={'>=$(vPrevMinQtr)<=$(vPrevMaxQtr)'} >} TotalInkCC_Sum*(CountryIB*SampleRatio*vFcOn+CountryIB_NoFC*SampleRatioNoFC*vFcOff)/((SampleCount*(-(ActualSamples or vFcOn)))*(-(ActualSamples or vFcOn))))/sum({1<QuarterID={'>=$(vPrevMinQtr)<=$(vPrevMaxQtr)'} >}(CountryIB*SampleRatio*vFcOn+CountryIB_NoFC*SampleRatioNoFC*vFcOff))

2nd expression (for current 4 quarters):

sum({1<QuarterID={'>=$(vCurrentMinQtr)<=$(vCurrentMaxQtr)'} >} TotalInkCC_Sum*(CountryIB*SampleRatio*vFcOn+CountryIB_NoFC*SampleRatioNoFC*vFcOff)/((SampleCount*(-(ActualSamples or vFcOn)))*(-(ActualSamples or vFcOn))))/sum({1<QuarterID={'>=$(vCurrentMinQtr)<=$(vCurrentMaxQtr)'} >}(CountryIB*SampleRatio*vFcOn+CountryIB_NoFC*SampleRatioNoFC*vFcOff))

This seems to be working for when current year is selected but when any previous year is selected it still shows quarters sorted as Q3,Q4,Q1,Q2 as shown in second chart above.

4 Replies
MK_QSL
MVP
MVP

Try to add below in your set analysis for current and previous year... Better if you provide sample data file or apps.

Year = {'$(=Max(Year))'}

Year = {'$(=Max(Year)-1)'}

Not applicable
Author

Here is the document. Thanks

MK_QSL
MVP
MVP

78.4 MB? Kindly provide reduced version...

Not applicable
Author

Here is a more reduced version. Thanks