Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

YoY and MoM % Growth

Hi,

I am trying to calculate YoY Income Growth 2015-2014 and MoM Volume Growth May 2015-May 2014 but am unable to get the calculation right.

This is my month Calc to bring in volume

Sum({$<Year={ $(=max(Year)) }>} [PIP_Profit_or_Loss])+ Sum({$<Year={ $(=max(Year)) }>} [Commission_Amount])

This is my month Calc to bring in volume

sum ({<[Month-Year] = {">=1<=5"}, [Month-Year] = {'Mar-2014','Mar-2015'}, Date =, Week=>} Volume)

Please be so kind as to assist me.

21 Replies
santhoo_san
Partner - Creator II
Partner - Creator II

Create a MonthID and use

for Previous year YTD growth:

Sum({<Year={$(=Max(Year))}, MonthID= {"<=$(=max({<Year={$(=max(Year))}>} MonthID))"},Month= >}Volume)

/Sum({<Year={$(=Max(Year)-1)}, MonthID= {"<=$(=max({<Year={$(=max(Year))}>} MonthID))"},Month= >}Volume)-1

for MOM Growth

Sum({<Year={$(=Max(Year))}, MonthID= {"$(=max({<Year={$(=max(Year))}>} MonthID))"},Month= >}Volume)

/Sum({<Year={$(=Max(Year)-1)}, MonthID= {"$(=max({<Year={$(=max(Year))}>} MonthID))"},Month= >}Volume)-1


you can also use unique auto number of a month to get the same MOM result

Sum({<MonthNumber= {$(=max(MonthNumber)-12)},Month= >}Volume)

to get exactly the same month in the previous year.

Not applicable
Author

Hi Santhosh,

Thank you for the response but I still cant seem to get it right. It is either showing 100% for everything or 0, it is also taking away the other numbers that were in.


santhoo_san
Partner - Creator II
Partner - Creator II

please share a sample application to understand the issue

Not applicable
Author

Hi Santhosh,

My system does not allow me to send anything or attach anything. I have done a print screen of sample data, will this help?

Yolanda Richards

stevedark
Partner Ambassador/MVP
Partner Ambassador/MVP

This application may help point you in the right direction:

QlikView App: Set Analysis - Prior Period Comparison

Steve

santhoo_san
Partner - Creator II
Partner - Creator II

Hope this helps

Not applicable
Author

Its working!!!

Thank you ☺

Not applicable
Author

I seem to have a problem with the coding of the date now

When I use this it works: =(max())

But when I use this for previous month =(max(-1)) It comes through as numbers.

How do I change this?

santhoo_san
Partner - Creator II
Partner - Creator II

instead of month =(max(-1))

use month=(max()-1)