Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to calculate YTD (Year to Date), % Growth (Vs Previous Year), % Quarter on Quarter Growth (QoQ), YTD (Quarterwise) in Qlikview?

Hello Experts,

I have attached a sample document I'm currently working on. The flelds highlighted in Yellow are the calculations that I would like to do on qlikview instead of doing them manually.

For Example:

Case 1:

ProductQ1'10Q2'10Q3'10Q4'102010YTD'10 (FY 10)YTD Q3'10FY'10 Vs FY'09 (%)YTD Q3'10 Vs YTD Q3'09 (%)
AA222222228888662%3%
AA111111114444332%3%
AA111111114444332%3%
AA232323239292692%3%

In this case, the values from Q1-Q4 and the year are mentioned. I want to calculate the Year to Date (YTD), YTD for Quarter, % change from Previous Year and YTD % change from Previous Year.

Case 2:

Product (QoQ % Change)Q1'10 Vs Q1'09Q2'10 Vs Q2'09Q3'10 Vs Q3'09Q4'10 Vs Q4'09Q1'11 Vs Q1'10Q2'11 Vs Q2'10Q3'11 Vs Q3'10Q4'11 Vs Q4'10Q1'12 Vs Q1'11Q2'12 Vs Q2'11Q3'12 Vs Q3'11Q4'12 Vs Q4'11Q1'11 Vs Q1'09Q2'11 Vs Q2'09Q3'11 Vs Q3'09Q4'11 Vs Q4'09Q1'12 Vs Q1'09Q2'12 Vs Q2'09Q3'12 Vs Q3'09Q4'12 Vs Q4'09
AA1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%
AA1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%
AA1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%
AA1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%1%1.50%2%3%

In this case, I want the calculate the Quarter on Quarter(QoQ) % change from the Previous years.

Like, Q1'10 Vs Q1'11, Q1'14 Vs Q1'10 etc. I basically need a logic where we can find the % change for one quarter of a particular year Vs same quarter of different year.

Please find the attached data sheet and let me know if you need further information or details.

Thanks and Regards,

Arvind

10 Replies
prieper
Master II
Master II

You may use SET-analysis, as described in this blog

https://iqlik.wordpress.com/2010/11/27/the-magic-of-set-analysis-point-in-time-reporting/

HTH Peter

Not applicable
Author

Thanks Peter, This helps.

Is there a way I can calculate the % values as well? I mean the growth compared to previous years and quarters etc.

Thanks again,

Arvind

sagarkharpude
Creator III
Creator III

PFA

Not applicable
Author

Sagar,

Thanks for Sharing. Is it possible for to send me the screenshot, excel file or the script instead of the .qvw file?

I'm using the trial version and cannot open the qlikview files as I've crossed the number of attempts.

Sorry for the trouble.

Arvind

sagarkharpude
Creator III
Creator III

YTD :- 

=Sum({$<Date = {'>$(=Max((YearStart(Date)))) <=$(=Max(Today()))'}>} sales)

MTD:-

=Sum({$<Date = {'>=$(=Max((MonthStart(Date)))) <=$(=Max(Datefield))'}>} sales)

OR

YTD analysis

=Sum({$<Datefield = {'>$(=Max((YearStart(Datefield)))) <=$(=Max(Datefield))'}>} Sales)

Or

=Sum({$<Datefield = {'>$(=Max((YearStart(Datefield)))) <=$(=Max(Today()))'}>} Sales)

MTD Analysis

=Sum({$<Datefield = {'>=$(=Max((MonthStart(Datefield)))) <=$(=Max(Datefield))'}>} Sales)

Or

=Sum({$<Datefield = {'>=$(=Max((MonthStart(Today())))) <=$(=Max(today()))'}>} Sales)

sunilkumarqv
Specialist II
Specialist II

Hi arvind ,

% growth of Prev year compare to current year

If you have expressions Current year an prev year

(Current Year-Prev Year)/Prev Year

then change number settings to %

in same % Quater as well

(Current qtr-Prev Qtr)/Prev Qtr

Not applicable
Author

Thank you Sagar,

This helps in finding the YTD, MTD analysis.

Is there any formula to calculate the % growth as well? Like % growth Vs previous year, % Quarter on Quarter growth etc.

Arvind

prieper
Master II
Master II

Sure,

you only need to put the results into relation, e.g.

A/B

or A/B-1

Peter

Not applicable
Author

Thank you Sunil.