Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
jleefjcapital
Creator II
Creator II

Dealing with change over time function

Hello,

I was able to create a master measure item to compute the period over period growth, but the problem is when I try to show the most current growth value, I need to select both dates otherwise the value is null.  I can understand why this is happening, but is there a way around this? 

Thank you,

Jessica

1 Solution

Accepted Solutions
sunny_talwar

Doing it in a KPI (Text Box Object) should be easier. See if this is what you want:

Capture.PNG

Text Box Expression: =Num(Sum({<Year = {"$(=Max(Year))"}>}Sales)/Sum({<Year = {"$(=Max(Year) - 1)"}>} Sales)-1, '#,##0.%')

HTH

Best,

Sunny

View solution in original post

20 Replies
sunny_talwar

There is a way to do it but you would need to share a sample. Do you have a sample you can share?

Best,

Sunny

jleefjcapital
Creator II
Creator II
Author

I would like to ultimately compute the growth rate for each of these indices and represent the most recent change in the most recent time period.  For instance. 

Original series:

2011 - 100

2012 - 140

2013 - 100

2014 - 50

2015 - 100

New series:

2012 - 40%

2013 - 29%

2014 - 50%

2015 -  100%

This is my original load statement -

COLI:

LOAD

    "Urban Area" as MSA,

    STATE,

    "100% Composite Index",

    "13 % Grocery Items",

    "29 % Housing",

    "10% Utilities",

    "12 % Transportation",

    "4% Health Care",

    "32 % Miscalaneous Goods and Services"

FROM [lib://Cost of Living/Cost of Living Index_Quarterly.xlsx]

(ooxml, embedded labels, table is [Qlik Load]);

I hope this helps.

Thank you!

Anonymous
Not applicable

please share a sample QVW and exactly what you need. We can be able to help you ..

sunny_talwar

Something like this:

Capture.PNG

When you make a selection you still see the percentage like below

Capture.PNG

Expression: =Sum(Sales)/If(Sum(Sales) > 0, Above(Sum({<Year=>} Sales)))-1

Note sure if this is what you wanted, but if you did this is what I did: I made the denominator and numerator in pieces (check them in the attached application and see how they impact when I make selections. Breaking a problem into pieces makes it easier to solve.

HTH

Best,

Sunny

jleefjcapital
Creator II
Creator II
Author

It works on a line graph, but not in a KPI where only one date is referenced. 

sunny_talwar

Doing it in a KPI (Text Box Object) should be easier. See if this is what you want:

Capture.PNG

Text Box Expression: =Num(Sum({<Year = {"$(=Max(Year))"}>}Sales)/Sum({<Year = {"$(=Max(Year) - 1)"}>} Sales)-1, '#,##0.%')

HTH

Best,

Sunny

jleefjcapital
Creator II
Creator II
Author

I will try this.  Thank you.  But, I just noticed that the value in the most recent period is not correct.  The computed value I get is -0.0088 whereas it should be -2.33*10-5.   The base values are:

2014- 21.942353

2015 - 21.94184

jleefjcapital
Creator II
Creator II
Author

The latter periods are computing correctly. 

jleefjcapital
Creator II
Creator II
Author

The KPI worked!

Thank you!