Question

Predictive Element for Dashboard

  • 5 May 2017
  • 1 reply
  • 130 views

Hello Team,


I have a requirement to have a predictive element added to my visualization. We have the situation were we have the number of customers added per month reported. We want a visualization that also shows the average number of customers added and also add a predictive element that shows how many may get added in next 3 months. How can i create this report with looker. Looking forward to your suggestions.


Thanks,

Sudeep


1 reply

Userlevel 3

@sudeep,


For the average calculation, you could add a measure with type: average to the view and include this on the report. Or alternatively you could create a table calculation to do that using the mean() function.


The prediction is a bit more complicated. One thing you might need to do in order to include future dates in the report for which there is no actual data would be to join in a table of dates. This Discourse page outlines how to do that for several dialects.


Once we have the future dates, a very simple prediction you could do would be to take the mean from your report + or - some part of the variance. A table calc something like this would do that for you:


coalesce(${count_new_customers}, (mean(${count_new_customers}) + (${variance} * rand()) - (${variance} * rand())))


You could also try implementing a linear extrapolation of the data. There is a regression example for exponential growth here.


If you have issues implementing any of this or if you have questions specific to your model, feel free to visit us at help.looker.com and we can take a look with you.


Rufus

Reply