Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to get quarter on quarter and year on year?

Hi,

My requirement is to find the Quarter On Quarter (QOQ) and Year On Year (YOY). That is when I click 2016 in year filter it should display the value of (2016-2015) and when I click Quater 2 it should display the value of (Quarter 2 - Quarter 1) like wise. I want to display the result as

Untitled.png

I'm attaching a sample .qvw file with data. Can some one please help me find it!

12 Replies
sunny_talwar

Like this?

Capture.PNG

vinieme12
Champion III
Champion III

Period Presets: Compare Periods on the fly

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
Gysbert_Wassenaar

See attached qvw


talk is cheap, supply exceeds demand
Not applicable
Author

No stalwar1‌, when I click 2016 it should display the difference between 2016 and 2015 (2016-2015). I dont wanna display the values of 2016 or 2015 which is already there. Like wise when I click Quarter 2 it should display the difference between its previous value.

Not applicable
Author

Hi,

Thanks for your response!

Please check SunnyT's response, I want the result as YOY:(value) and QOQ:(value), I dont wanna display in a table form and more over you have just displayed the current and previous value. But I only need the difference between current and previous value and get them displayed near YOY or QOQ respectively.

Anonymous
Not applicable
Author

Hi Vinod,

Use below expression to find out the values of YoY & QoQ

YoY : =Sum({<Year ={$(=Max(Year))}>} Sales) - Sum({<Year ={$(=Max(Year)-1)}>} Sales)

QoQ:=Sum({<Year={$(=Max(Year))},Quarter ={$(=MaxString(Quarter))}>} Sales) -

Sum({<Year={$(=Max(Year))},Quarter ={$(=MaxString(Quarter)-1)}>} Sales)



Let me know still your facing the problem.

Warm regards,

Venkata Sreekanth

Not applicable
Author

Hi,

I tried using your expression, but what it does is that it just shows the value of the selected filter. Like when I select 2015's Quarter 2 it is showing that particular value.

What I need is to show the subtracted value of 2015 Quarter 2 and 2015 Quarter 1.

Anonymous
Not applicable
Author

Hi,

The above mentioned expression gives you the difference b/w Max quarter & Previous of max quarter.


Expression:

Sum({<Year={$(=Max(Year))},Quarter ={$(=MaxString(Quarter))}>} Sales) -   

Sum({<Year={$(=Max(Year))},Quarter ={$(=MaxString(Quarter)-1)}>} Sales)


Here ,

Max Year,Max Quarter (ex Q2): Sum({<Year={$(=Max(Year))},Quarter ={$(=MaxString(Quarter))}>} Sales)

Max Year,Max Quarter -1 (ex Q1): Sum({<Year={$(=Max(Year))},Quarter ={$(=MaxString(Quarter)-1)}>} Sales)



Warm regards,

Venkata Sreekanth



Not applicable
Author

Please check the below file, it is only displaying the value of selected quarter and not displaying the subtracted. Can you able to understand my requirement?