Skip to main content
Announcements
See why Qlik is a Leader in the 2024 Gartner® Magic Quadrant™ for Analytics & BI Platforms. Download Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Set analysis - about getting the value from previous period(date) range

Hello everyone.

 

We need to use the Date of previous period to estimate the amount,

in order to predict the amount may occur.

i1.png

The relational of “Date” and “Date – previous period” has done,

please see the qvw application below to figure out.

 

Expression of “amount – previous period” :

i2.PNG.png   

But we cannot show the correct amount. It’s there anything wrong?

For details, you can see the file and row data below to figure out.

Any help most gratefully received & thank you in anticipation

1 Reply
datanibbler
Champion
Champion

Hi Nina,

sorry, I can't help there - would be very interesting to know how this works.

AfaIk, Set_analysis will not work here as that is only calculated once before the  chart is displayed.

You cannot make it dynamic so that your expressions will, for a given period (dimension), use the value of the period before.

You might try with the aggr() function. That helped me a bit further, though I never quite made it - or rather, I had to abandon it for it was taking me too much time. - Or, if it's not too much data you have to display, try using the PREVIOUS fct. (after a SORT) in the script so you have a native field for the "period_before"

Best regards,

DataNibbler