Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

arvindjha2050
New Contributor II

QOQ Comparison

Hello members,

I had a query .

I have the below dataset :

[Sales]:

Load * Inline [

TranDate ,Quarter, Sales

04/04/2017,Q1-18 , 10

04/07/2017,Q2-18 ,12

04/03/2018,Q4-18 ,16

04/04/2018,Q1-19 ,18

04/12/2017,Q3-18 ,11

];

I have a filter and KPI.

My requirement is suppose i select q1-19 in filter , then KPI should show percent increase/decrease in sales with respect to q4-18 ,if i select q4-18 , then KPI should show percent increase/decrease with respect to q3-18

Thanks

2 Replies
punam_wagh
New Contributor III

Re: QOQ Comparison

Try this.

Temp:

Load *,

         '1' as flag

resident Sales

Order By TranDate  asc;

Drop Table Sales;


Final:

Load

*,

previous(Sales) as Prev_Sales

Resident Temp;


Drop Table Temp;

you can use this field on Front end as (Sales-Prev_Sales)/Prev_Sales

arvindjha2050
New Contributor II

Re: QOQ Comparison

Thanks a lot for the response