Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Forecast

Hi every one ,

I have a excel like below, i want a bar chart that show sale amount for exist year and show forecast sales for 2016(next year) ,

which function i can do ?

please help me ?

Best Regards

Hamide

1 Solution

Accepted Solutions
Kushal_Chawda

You need to have Year 2016 in data

LOAD * Inline [

Year,Value

2010,100

2011,200

2012,250

2013,150

2014,200

2015,120

2016 ];

Expression:

=if(Year<>'2016',sum(Value),

    linest_m(total aggr(if(sum(Value),sum(Value)),Year),Year)*Year

    +linest_b(total aggr(if(sum(Value),sum(Value)),Year),Year))

View solution in original post

6 Replies
Anil_Babu_Samineni

Above(Sum(Sales))

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Not applicable
Author

Thanks for your reply , but it's not my answer .

i write below expression :

     if(sum(Sale),sum(Sale)

     ,linest_m(total aggr(if(sum(Sale),sum(Sale)),Year),Year)*Year

     +linest_b(total aggr(if(sum(Sale),sum(Sale)),Year),Year))

but my expression doesn't  show sales amount for 2016

Anil_Babu_Samineni

Can you please post small Application

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Kushal_Chawda

You need to have Year 2016 in data

LOAD * Inline [

Year,Value

2010,100

2011,200

2012,250

2013,150

2014,200

2015,120

2016 ];

Expression:

=if(Year<>'2016',sum(Value),

    linest_m(total aggr(if(sum(Value),sum(Value)),Year),Year)*Year

    +linest_b(total aggr(if(sum(Value),sum(Value)),Year),Year))

Not applicable
Author

Thanks Kushal,

For static data like load inline it is ok but for dynamic data which solution you offer,

My document is connected to sql server and i haven't next year in my data.

Regards

Hamide

Kushal_Chawda

You can manually add Year like below

YourData:

LOAD  Year,

...

FROM Table;

concatenate(YourData)

LOAD * inline [

Year

2016 ];