Adding Trendlines to Line Visualizations

Under Visualization Settings, you can choose to add a regression or moving average trendline to your line series which can help to depict a clearer pattern in the data. Options include Linear, Logarithmic, Exponential, Power, Quadratic, and Moving Averages.

Hi, this is Jen Lasser with Adobe Analytics Product Management. In this video, I’m going to show you how to add Trendlines to any Line visualization in Analysis Workspace. Trendlines helps you depict a clearer pattern in your line visualization, helping to smooth out any peaks or valleys that you might see. Let’s take, for instance, this hourly trend that we’re looking at. We can see there’s a lot of up and down movement. To add a Trendline, you go to the Visualization Settings, and click Show Trendline. We offer quite a few Trendline options. It defaults to linear regression. We also have logarithmic, exponential, power and quadratic regression, as well as Moving average. Let’s take a quick look at this linear regression line. So the Trendline looks like a gray line overlaid on top of the data. And as you can see here with the data that’s moving up and down quite a bit, the linear regression line helps us see that the data’s actually trending downward a little bit. Now, the regression Trendline that you want to pick just depends on the shape of your data. Each one of these is explained in our documentation in full, so be sure to read about those and see which one works best for your dataset. I wanted to demo Moving average as well before we wrap up this video. Moving average allows you to smooth out the dataset that you’re looking at. What Moving average does, it’s also called rolling average, is it takes a set of data points, defined by your period’s input and it averages those and uses that as the Trendline data point. And then it moves to the next period. So Moving average here is looking over two periods and we can increase this and notice that the Trendline starts to smooth itself out a bit. And that’s because it’s using more previous time periods to learn from. So let’s sit here at 12 periods. What this has does is taken the last 12 hours that you can see in the graph here and average them and use that as the first data point and then it moved to the next one. Rolling average is a really great way, again to kind of smooth out those peaks and valleys in a dataset, especially one that looks like this. With any Trendline that you’re using, we do recommend removing future dates and any partial day data from today because that could affect the shape of the Trendline. So for example, if you have a line visualization for the current month, you’ll likely have zero data points for those future dates. To remove them so that the Trendline is not affected, you want to go to the source table, go to Column settings and then choose Interpret zero as no value. Notice that it not only stopped the Trendline from going into the future, the shape of the Trendline also changed as well because it wasn’t accounting for zero data points. Interpret zero as no value also removes those zeros from the table. So this has been a demonstration of Trendlines in line visualizations. Use these to help depict a much clearer pattern in your data and explore the different regression options that we provide, as well as Moving average, depending on the use case that you have. -

For more information, see the documentation.

If you want to export moving averages or you want to add many averages to a table at once, you can create calculated metrics instead. Learn more in this video.