Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
March 11, 2PM EST: Do More with Qlik - Getting Started wtih Qlik Sense SaaS - Redux. REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
sunilkumarqv
Specialist II
Specialist II

Compare current quarter year with previous quarter year

Hi Friends,

I have to compare same quarter year with previous year quarter year than I'm trying to Replace Sales example Q1 2016 sales is 4 with Q1 2015 sales 10 then i will get Q1 2016 as 10 similarly  all ,please help me to achieve this

Quarter Year ,Sales

Q1 2015, 10

Q2 2015,23

Q3 2015,20

Q4 2015,5

Q1 2016,4

Q2 2016,6

Q3 2016,10

Output :

Dimension as "Quarter Year" and expression sum (Sales) then output should be like


Quarter year ,Curr sales ,Presales

Q1 2015, 10,0

Q2 2015,23,0

Q3 2015,20,0

Q4 2015,5,0

Q1 2016,10

Q2 2016,23

Q3 2016,20

4 Replies
Anil_Babu_Samineni

Front end solution may be this?

Create object and use dimensions are [Quarter Year]

Expressions are

Curr Sales

Sum({<[Quarter Year] = {'$(=Max([Quarter Year]))'}>}Sales)

Presales

Sum({<[Quarter Year] = {'$(=Max([Quarter Year]-1))'}>}Sales)

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
sunilkumarqv
Specialist II
Specialist II

Hi Anil,

$(=Max([Quarter Year])) this not work [Quarter Year] only when we have numeric also the value will get max Q3 2016,10


I have to get growth of sales  Q1 2016/Q1 2015 -1

so im trying to create a new column or any other solution let me know



Anil_Babu_Samineni

Q1 2016 is the Max year of first quarter and then Q1 2015 - 1  is that you meant is Last year of Max year and then it should be first quarter (Here what does -1) . Would you describe more please

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
jayaseelan
Creator III
Creator III

Hi Sunil,

I have got your desired output. I have done this on edit Script. Please find the attachment. i hope this will helps you.

Thanks,