Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

philmywallet
New Contributor III

Chart Prediction / Forecast

I have a line chart to show how many new starters and Leaves I have on a month by Month basis.  I want to create a forecast to show where I expect this will be by the end of the fiscal year.

Although I can do a linear trend line, this overlays across the whole graph.  Is there any way I can set a trend line after my actual data so it only displays going forward from the most recent data point?

i.e. 

Month 1 actual = 10

Month 2 actual = 20

Month 3 actual = 30

Month 4 Forecast = 40

Month 5 Forecast = 50

etc

2 Replies
datanibbler
Esteemed Contributor

Re: Chart Prediction / Forecast

Hi,

you can try using the chart_colour (in the properties, that is when you click on that little cross next to your expressions) - just try making that colour the same as your background up to the date when your real data ends, so it will become kind of invisible.

Or you can try wrapping that expression itself in an IF_construct so that it is only calculated for all dimension_values after that date.

HTH

morganaaron
Valued Contributor

Re: Chart Prediction / Forecast

Another option is to create the trend line yourself - ensure your future dates are in your model and then use some of the inbuilt functions (LINEST..) along with the above function to work out your prediction components.

You can find an example in this document under forecasting:

QlikView How To (or Tips & Tricks) Application

Community Browser