Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
bhavvibudagam
Creator II
Creator II

%change calculation

Hi Experts,

Can any one please help me on calculation of %change.

In the excel the %change is calculated from Frequency aggregated by month as

N/A

=(I10-I9)*100/I9

=(I11-I10)*100/I10

=(I12-I11)*100/I11

Please help me on getting this calculation into Qlik.

1 Solution

Accepted Solutions
ali_hijazi
Partner - Master II
Partner - Master II

you can use either previous / peek functions in the script or the Above function on the chart

in script you sort your data by date then in a successive reload you wirte:

if (rowNO() = 1,null(),100*(Frequency - previous(Frequency)) / previous(Frequency)) as %Change

on the chart you would write: 100 * (Sum(Frequency) - Above(Sum(Frequency))) / above(Sum(Frequency))

or Sum(Frequency) / Above(Sum(Frequency)) - 1

and you set formatting to display as percentage in the NUMBER tab of the chart's properties

I can walk on water when it freezes

View solution in original post

2 Replies
ali_hijazi
Partner - Master II
Partner - Master II

you can use either previous / peek functions in the script or the Above function on the chart

in script you sort your data by date then in a successive reload you wirte:

if (rowNO() = 1,null(),100*(Frequency - previous(Frequency)) / previous(Frequency)) as %Change

on the chart you would write: 100 * (Sum(Frequency) - Above(Sum(Frequency))) / above(Sum(Frequency))

or Sum(Frequency) / Above(Sum(Frequency)) - 1

and you set formatting to display as percentage in the NUMBER tab of the chart's properties

I can walk on water when it freezes
sunny_talwar

Should be like this

Sum(Frequency)/Above(Sum(Frequency)) - 1