# New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Support Cases coming to Qlik Community Oct. 4! Start chats, open cases, explore resources: READ DETAILS
cancel
Showing results for
Did you mean:
Creator

## How to built Predictions models for qliksense?

Hi experts,

I have a bar graph  which having Total sales of q1,q2,q,3 how to forcast  for q4 in qliksense. Please throw  some light .i went some links

but i could not make.

Thanking You

Krishna

4 Replies
Specialist

by having a predictive data in excel (or in any format) or you want to do that on calculated base in Qlik?

Regards

Partner

I suggest you to take a look at linest_m and linest_b functions below:

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/ChartFunctions/StatisticalAggregat...

https://help.qlik.com/en-US/sense/June2018/Subsystems/Hub/Content/ChartFunctions/StatisticalAggregat...

with these statistical functions you can do a linear regression.

I hope this helps.

MVP

The stock answer is probably that you need to use 'Advanced Analytics' as Qlik call it, which is effectively just a technique to throw the data out to R or Python, have that run a model, and then bring it back.

You would have to have a separate expression for the prediction and the actual, but if you stack the bar that would be fine - and it would also allow you to have separate colours.

Similar could be achieved by showing an average of the previous quarters for Q4.

You would need to ensure that you have a Q4 loaded into the data model (so that the dimension exists).

Your expression for actual would be something like:

sum([Total Sales])

The average would be something like:

if(sum([Total Sales]) = 0, sum(TOTAL [Total Sales]) / count(DISTINCT TOTAL {<[Total Sales]={"<>0"}>}Quarter), null())

This basically says that if there are no sales in the quarter, add up the total for the quarters where there are sales and then divide by the number of quarters where there are not.

This approach depends on the data being in full quarters.  If you have monthly data, and need to report on part way through a quarter (e.g Q3 contains one month actual and two months projection) you would need to do similar to the above but do it on a month basis, with an aggr:

sum(aggr(if(sum([Total Sales]) = 0, sum(TOTAL [Total Sales]) / count(DISTINCT TOTAL {<[Total Sales]={"<>0"}>}Month), null()), Month, Quarter))

You may find this post on calculating run-rates of interest:

There is another post linked to this, which has some specific Qlik examples:

https://www.quickintelligence.co.uk/qlik-run-rate/

Steve

Creator
Author

I want forcast should happen in qlik

Tags
Community Browser