Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How can I create predictive or forecasting Analysis

Hi all,

Is it possible to create forecast analysis for 2015 with QV ?

Sample Data:

LOAD * INLINE [

Year, Month, Value

2014, 1, 100

2014, 2, 500

...

2015, 1, 50

2015, 2, 100

];

How qv can create others months 3,4,5,6,7,8,9,10,11,12 for the forecasting 2015 ?

Thanks for your help.

1 Solution

Accepted Solutions
Anonymous
Not applicable
Author

Hi,

Use below logic in script to populate data for req months:

Load Year,Month,
If( IsNull( sales ), Peek( Sales ),Sales ) as Sales
Resident Sales
Order By Year,Month;

View solution in original post

18 Replies
sunny_talwar

QlikView can definitely create Future values for Month and Year, but you need to have some basis for forecasting your Value? Do you have some trend that you would want to forecast?

Best,

S

Not applicable
Author

Hi Sunindia,

Thank you for your your response.

With my sample, is it possible to create a trend forecasting or it is not possible with the actual data. I have a value for all months in 2014 and only for jan and feb of 2015 year. My idea is to imagine this value at the end of  year. (dec. 2015). I don't know how can I do that ?

What are the parameters missing into my model to achieve that ?

Thanks for your help.

Not applicable
Author

Hi,

Forecasting is not an out of the box feature in Qlikview. You need to create the function with the assumptions you need for the forecast. For example, you might want a simple forecast that takes the same month last year or a more sophisticated one with a linear regression to extrapolate the missing data. All depends on the conditions you need.

You should read Forecasting in Qlikview to learn how these solutions can be implemented.

Hope this helps.

Kind regards,

Nuno

sunny_talwar

So the dates have been created till 31/12/2015, but we need to know how would you forecast Active and Termination? Right now I am just using the the last available numbers from 02/16/2015 to carry them forward for all the dates till 2015. But this may not be the correct forecasting. Is there a specific behavior that it follows? Like cyclical behavior or always increasing? Until we know how we want to forecast, this will give us garbage.

PFA the application.

HTH

Best,

S

Anonymous
Not applicable
Author

Hi,

Forecasting- Is to predict what will be the  best margin on sales depending on no of  products sold.

For eg : If you have sold for 5 products will fetch you 100 pounds.

                          10 products -  180 pounds

                           20 products -  320 pounds

Now if you want to know with which quantity of products you get the highest margin of profit?

You make calculations to find out  profit   based on  selected  quantity respectively.

These calculations which are done are termed as Forecasting.

or

in your example:

Sample Data:

LOAD * INLINE [

Year, Month, Value

2014, 1, 100

2014, 2, 500

...

2015, 1, 50

2015, 2, 100

];

You can create a calculated field in your load statement where you take the total, say, for the last 14 months(from Jan to 2015 feb), then divide it by the number of days  for 14 months and you will get a daily average. You then multiply that daily by the number of days for each month (i.e next 10 month) and you get the forecast for others months 3,4,5,6,7,8,9,10,11,12 for the forecasting 2015 .

See below link:

http://community.qlik.com/docs/DOC-3555

Regards

Neetha

Not applicable
Author

Sunindia,

The difficulty is Active can increase or decrease in time like Termination.

Active are employees who start the company ( can varied)

Termination are employees who left the company (can varied)

Not applicable
Author

Neetha P,

Thanks for your response, interesting!

But How can I create months (3,4,5,6,7,8,9,10,11,12 for 2015) in the model with the Inputlfield Active and Termination ?

he solution with inputfield and InputSum is more flexible but how can I create 12 months for 2015 ?

See attachment.

Thanks for your help.

Anonymous
Not applicable
Author

Hi Judikael,

Please try below code for generating calendar:

LET vTodaysDate = num((MakeDate(2015, 2, 28)));
LET vStartDate = num(AddMonths(YearStart($(vTodaysDate)),-2*12));
LET vEndDate = num(YearEnd($(vTodaysDate)));
LET NumberOfDays = num(YearEnd($(vTodaysDate))) - $(vStartDate) + 1;

Table:
LOAD DISTINCT
Year(Date) as Year,
Month(Date) as Month,
Date(MonthStart(Date), 'MMMYY') as MonthYear,
if(monthstart(Date) <= $(vTodaysDate), 1, 0) as _History,
'Q' &
Ceil(Month(Date)/3) as Quarter,
Dual('Q' & Ceil(Month(Date)/3) & '-' & Year(Date), Year(Date) & Ceil(Month(Date)/3)) as QtrYear,
Week(Date) as Week,
Weekstart(Date) as Weekstart,
Weekend(Date) as Weekend
;
Load
Date($(vEndDate) - RecNo() +1) as Date
AutoGenerate($(NumberOfDays));

Regards

Neetha

Not applicable
Author

Neetha,

Thanks for your excellent calendar but how can I have 12 months for 2015 in straight table ?

Thank for your help.