Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

kunkumnaveen
Valued Contributor

Linear forecast expression

Hi,

     i have to show coming next three years(2017,2018,2019) of spend based up (2014,2015,2016) data?

let say i my sample is

                    Year              spend

                       2014              100

                       2015                200

                        2016                 70

how much     2017                  ?

will be  for       2018                   ?

                       2019                    ?\

how to write a linear expression .......

Thanks

1 Solution

Accepted Solutions

Re: Linear forecast expression

Is this you are expecting?

Expression i used

If(Sum(Spend),Sum(Spend)

,Linest_M(TOTAL Aggr(if(Sum(Spend),Sum(Spend)),Year),Year)*Year

+Linest_B(TOTAL Aggr(if(Sum(Spend),Sum(Spend)),Year),Year))

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

6 Replies

Re: Linear forecast expression

Is this you are expecting?

Expression i used

If(Sum(Spend),Sum(Spend)

,Linest_M(TOTAL Aggr(if(Sum(Spend),Sum(Spend)),Year),Year)*Year

+Linest_B(TOTAL Aggr(if(Sum(Spend),Sum(Spend)),Year),Year))

Capture.PNG

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)

View solution in original post

kunkumnaveen
Valued Contributor

Re: Linear forecast expression

Hello Anil, thanks for your reply,

but i am not getting what you got..

i used this

load * inline

[

Fyear,fspend

2014,100

2015,200

2016,70

2017

2018

2019

];

Untitled.png

i am not geeting 2017,2018,2019...Why?

kunkumnaveen
Valued Contributor

Re: Linear forecast expression

i have done a mistake now i realise it Year field i need to change

Re: Linear forecast expression

You can use Fyear instead of Year and then look

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
kunkumnaveen
Valued Contributor

Re: Linear forecast expression

Hello Anil,

               i wrote below expression in Line Style , so that those years will display in dots,

if(fspend>2016 ,  '<S3>')

but some how this is not working ,can u say wat i am missing  plz

Re: Linear forecast expression

There is no wrong on your expression, Seems working to me

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)