Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
krishna789
Creator II
Creator II

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.

amomtomartinpohlstevedarkprananellutlastalwar1msbhuvanesh003countwisethkarnerrittermd

Thanking You

Krishna

4 Replies
zebhashmi
Specialist
Specialist

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

Regards

agigliotti
Partner - Champion
Partner - Champion

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.

stevedark
Partner Ambassador/MVP
Partner Ambassador/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:

https://www.linkedin.com/pulse/improving-your-run-rate-steve-dark/

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

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

Steve

krishna789
Creator II
Creator II
Author

Hi Jahanzeb Hashmi

I want forcast should happen in qlik