Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day, I need help please in calculating the column 'Difference from Previous Year'. Thank you in advance!
My data is like this (and also attached):
data:
load month ,year,count from table;
left join
load addmonths(month,1) as month,
count as pre_count
resident data;
in frontend use the sum(count)-sum(pre_count)
use the below for reference:
https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/td-p/1697294
Hello @adrianfer
I solve this issues using "before()" functions.
expression : Sum(Count) - before(Sum(Count))
data:
load month ,year,count from table;
left join
load addmonths(month,1) as month,
count as pre_count
resident data;
in frontend use the sum(count)-sum(pre_count)
use the below for reference:
https://community.qlik.com/t5/App-Development/Previous-month-sales-in-loading-script/td-p/1697294