Time Series Forecasting in Tableau

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right thanks for tuning in everyone this is anthony smoke gun check me out on anthony smoke calm definitely subscribe to me here on youtube today we're back in tableau going to be discussing forecasting in tableau so making a forecast in tableau is relatively easy but for the layperson estimating whether that forecast is any good is a challenge so i'm gonna provide a few tips to help you better understand if you have a good model or not in tableau so we'll cover number one how to spot the difference between additive and multiplicative patterns those are two options you're gonna have to pick to make a forecast in tableau how to evaluate the quality of the model with this mace value you know shoutout to p diddy and mace how to compare your forecast with your actuals to gauge the quality of your model so you can use a little bit of hind casting so forecasting in tableau uses a technique known as exponential smoothing and exponential smoothing is just a forecasting algorithm that looks to find a regular pattern in your data that can be continued out into the future so let's take a look at my you know my dataset here i literally have a date and a sales value so you can kind of look at this trend here and i end in December 2017 I actually have actuals for 2018 but I'm showing a forecast at 2018 because later in the video I want to compare this to actuals to see how tableau predicted the values so this is a forecast and you have your confidence intervals so 95% confidence intervals meaning the truth value will fall somewhere 95% within this discount this this range here so the algorithm is 95% sure that your true value will fall somewhere in this range so let's go back into this right here this is just a little example will show how to put this together let me show you a data source first so again I got a date and actual sales very simple data set right it just goes out to the end of 2018 and I'll show you how we put this together I'm just gonna drag the beat date up here to columns right we'll drag actual sales out here to rows and let's change this over to a month but you see I get that that pattern there I'm going to drag and drag this out here and I only want to look at remember I only want to look at 2013 through 2017 I want to exclude 2018 that's fine all right and we'll go to the analytics pane right here and there's a forecast we can simply just drag that here and okay so my colors here a little bit I'm just gonna change this to black real quick that's fine say okay you can see I've got my actuals and you're wondering what is this right so this is what's called a naive forecast so it's simply it's taking a value that's very close to the last observed value and just pushing that out to the future so it's really only used for comparison with better forecasts right using more sophisticated method so this is usually what tableau starts you out with but this is not what you want to to keep so you can you can change these these values so I'm gonna go back to here and you're gonna change this back to two white real quick bear with me say okay and so how do we actually I'm gonna go here how do we change the the naive forecast what do we change that to so in order to understand let's let's take a look at the forecast here we'll go into forecast options you'll see that I can change the length of the forecast I can say two years you know push it out here we're gonna keep it 1 I can aggregate by different levels here we're gonna keep it at months because my data is at a month level so let me draw your attention to the forecast so you've got this automatic automatic with seasonality and custom um in this model automatic with seasonality doesn't do much but if we go and hear a custom this is where people say hey what do I choose here for my trend do I choose additive do I choose multiplicative for my season also do I choose additive and multiplicative so really quick I'm gonna go into PowerPoint right here and you know I want to show you this this is what additive seasonality looks like you can see the overall trend is up right so it's an additive trend even though that trend is going up from from the from the bottom here to the top right from from the bottom to the peak here for every cycle we can see that the the distance is about the same right if I go from the bottom to the top here right for every cycle the distance is about the same so in my seasonality you know again even though the trend is up right my my you could say wave amplitude is about the same so in multiplicative take a look at this from from the bottom to the top here on every cycle I'm getting a larger increase through every cycle so that is a multiplicative seasonality right so if you can understand that basic now there are various statistical ways to to determine whether you have additive or multiplicative patterns but you know just just understanding how to spot that can can help you out a little bit here so if we go back into forecast options for my trend you know hey I might start and say hey maybe that's additive and you know maybe maybe this is additive as well well you know what I'm gonna choose something that's really wrong let's go multiplicative and multiplicative right so most people will just choose something and say hey you know what I got a forecast in tableau I'm good to go so here's how you would gauge the quality of this forecast that tableau gives you we're gonna get a forecast I want to describe the forecast and so this is one thing that's great about though in compared to power bi right Tablo gives you that that background information and you can also take the points out of tableau and analyze them as well but if I take a look at this you can see that my quality here is poor right so that's not good and if I go back here into models what I care about is my mase value so this is called a mean absolute scaled error and so anything above one right means this model is worse than tableau just choosing the naive model and pushing out a data point into the future a straight line so if you're above one that's that's really bad you don't you don't want that right so so that tells me choosing multiplicative or trend and for a season is bad so you know don't you don't want to share this this forecast with anyone so we can go back in here and we can we can play with the with the options here may additive additive you know that that could be a possibility I can go back here and I can go and look at the describe the forecast and oh hey it's still poor but you know I got a little bit better with my mean additive scaled error right so herbs are mean absolute scale their point nine two so not quite where I want to be and so again the lower this number the lower this mace the better your model is right the less errors that you have so I know that if you're below a point four then tableau will give you a good in the summary this quality right here it'll give you a good quality if you're below point eight you'll get a you'll get an okay quality and if you're greater than point eight you'll get a poor quality so this model is greater than 0.8 so weak so we get poor so you know last you know I would try this none of my forecast options let's go with no trend and keep the season additive right so even though it looks like I'm trending upward sometime in 2015 my pattern got really really seasonal and the trend looks like it stopped right it doesn't look like it's trending up it's just going through a cycle here so you know if we do an additive I'm sorry we do mo trend but do an additive season this could help our our model qualities if I go back in here describe the forecast so I'm okay right then look at the model I'm at a point five eight Mase all right so so okay this is the best I'm going to get out of tableau so we will stick with this so now I want to show you how you would compare this forecasted 2018 to actual 2018 so the great thing about I'm gonna go to a new sheet here the great thing about tableau is that there let me go back I can I can hit ctrl a and it's gonna highlight all the points right I control a and when I come to a new sheet it control V it will put all the points in here for me to analyze which is really cool so you know have my actual sales and then the forecasted values with that that 95% lower bound and upper bound right so I can get rid of let's get rid of the upper let's get rid of the lower I am going to go back here and this is not actual sales we're gonna call this forecasted sales and we're gonna I'm going to name this to date because that is the same name oops as my actuals data also have a date in the actuals data I can rename this clipboard if I wanted to data source yeah we'll just do this that's fine forecast that's fine I can go to my data source and I could I could rename this if I wanted to as well [Music] forecasted data I want everything to be have a new name here I can double click in here can I not I know I can rename but that's fine that's neither here nor there the point I want to make is you're gonna have to rename rename this to match your your actuals data and we may rename the measure to forecasted sales so so this should be fairly simple at this point I'm going to take my date let's put that up here oh one thing you're gonna have to do here you're gonna have to change this data type to a date right so that's good and it's given to the forecast indicators gave you this summer forecast brings forecast its sales up here to rose and you'll see I get that pattern this is my forecast anything past you know 2018 is a forecast and so I'm gonna show me your whoops I should have left that that's fine we'll go back in here and we'll just change this to month all right that gets me back to my to my pattern so again this is my forecast what I want to do now is overlay my actuals on here right this is what we cut and paste into this into this viz now I want to pull my actuals data in here now you'll see here I have a amusing data blending on this date in my actuals data have a date in the forecast I have a date so if I go to let's go to data in order to make this work you have to have a common field and so because I've named my date dimension date in the forecast and the actuals tableau automatically says yes I'm going to link on these fields but if you did not you could go in here to custom and you can select add and you can choose items to to link up we're not going to do that we're gonna go with the automatic say okay now that allows me to overlay in my actuals I can bring in actual sales here right then at the bottom I have actual sales right the numbers are gonna be a little different you see the forecasted sales in the tooltip and the actual sales a little different and I can go in here and I can go dual axis and I get that get that overlay right let's just change that to red make it pop a little bit say okay okay great I'm gonna hide that now this is all actuals and I can compare my forecast so this is a forecast based upon previous patterns tableau thought that we would have $50,000 in forecasted sales because probably in January of 2017 right you got a little pop there forty forty five thousand tableau thought we'd have a little bit more but you know actuality happens right and actuals at about forty thousand but it does converge up here this looks like a pretty decent forecast model right so knowing this knowing that I have a decent forecast hubble's provided me a decent forecast I can go back into my original right and again I'm this is a prediction of 2018 I can go in here and I can show filter now I'm gonna say show 2018 right I have my actuals in here for 2018 and this is my predicted 2019 right we don't have actuals for 2019 we're gonna rely on tableau so knowing that it did a good job of predicting actuals for 2018 we can assume it's gonna do a good job a decent job of predicting 2019 and actually we can go in here take a look at the forecast and the quality is okay right if I take a look my my mase value is 0.61 okay that's good so this has been anthony smile hope you enjoyed what we talked about here we learn how to spot the difference between an additive and multiplicative pattern we learn how to evaluate the quality of our forecasted model with the mace value and we learn how to compare your forecast with your actuals to gauge the quality of the model so this been a Panisse Moke get out there do some great things with your data thanks for watching everyone
Info
Channel: Anthony B. Smoak
Views: 14,990
Rating: 4.869091 out of 5
Keywords: Tableau, Anthony Smoak, Business Intelligence, Data Visualization, Tableau Tips, Tableau Charts, Tableau dashboard, tableau dashboard design, Tableau Public, Tableau Youtube, Tableau Training, Analytics
Id: n3sCclboWJE
Channel Id: undefined
Length: 15min 26sec (926 seconds)
Published: Mon Feb 04 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.