Discussion board where members can get started with QlikView.
I would like to calculate the percentage change in the script between stock value on different days.
Here is my original data:
What would be a good expression for doing this? I tried this expression but it doesn't work:
FirstSortedValue(Day,Stock Value) - Above(FirstSortedValue(Day,Stock Value) / Above(FirstSortedValue(Day,Stock Value)
Does this make sense?
source: // replace with your data
date(makedate(2015) + rowno() -1) as Day,
floor(rand()*10) as Value
Peek(Value) as PrevValue,
(Value - Peek(Value)) / Peek(Value) as Change%
order by Day;
View solution in original post
in script or in chart?
if in chart what's the expression for 2nd column (stock value)?
Stock Value is just a number...no expression for it...same with day...the data above is from my excel file...
I want to edit it in the script if possible..to load the percentage change of stock value from day to day as 'growth rate'....
Yes thank you very much!
I think you can do that in chart too; if sum(val) is expression, and the chart is day ordered, above(sum(val))