Extend axis in Tableau

Extend axis in Tableau

Extending axes in Tableau plays a crucial role in data visualization and analysis. By extending axes, you can effectively control the range and scale of data displayed on the visualizations. This capability allows you to focus on specific data points of interest, zoom in on important details, or provide a broader context for your audience.

Extending the axes enables you to adjust the minimum and maximum values, which can help highlight subtle variations in data or emphasize specific data ranges. This flexibility is particularly useful when dealing with large datasets or when there is a need to compare multiple measures or dimensions within the same visualization. Additionally, extending axes allows for a more accurate representation of data, preventing any distortion or misinterpretation caused by restricted axes.

Beyond trendlines and forecasts, Tableau handles predictive modeling functions well and they are immensely useful for many organizations to anticipate different opportunities. We’re going to look at a modelling function and how to adapt a time series visualization to our needs. 

STEP 1: Connect to data 

In Tableau Desktop, connect to Sample – Global Superstore data provided by Tableau. 

STEP 2: Create the necessary calculations 

Let’s create a calculated field called “Predict median profit”: whit this calculation we will see the expected value for a defined quantile (for us 0.5 which is the median), a target expression(SUM(Profit)) and the predictor ( in our case month of Order Date because we want to base the prediction on past performance). 

MODEL_QUANTILE(0.5, SUM([Profit]),ATTR(DATETRUNC(‘month’, [Order Date]))) 

STEP 3: Build the vizualization 

By using the month and year of Order date on columns, let’s build a line chart with the sum of Profit on the Rows shelf.  

Add “Order Date” on the columns shelf 

Add “Profit” to the Rows shelf 

Add the calculation to the view. 

Drag “ Predict median profit” calculated field to the Rows shelf, to the right of SUM(Profit) 

Combine both charts into one by right-clicking the measure and selecting “Dual Axis” 

In dual axes charts we would need to align the scales: 

Right-click the secondary axis and select “Synchronize Axis” 

We should extend the date range into the future, in order to add marks beyond our current date range: 

In the Columns shelf, click on the MONTH(Order Date) pill and select “Extend Date Range”. Here we will input the length of the additional time, let’s input 2 years. 

 

The profit line will stay as it is, but Tableau will automatically update our input and extend the prediction line 2 years into the future, computing the predicted profit on future dates. 

 Tableau creates these additional marks in the view to compensate for the missing data, but they are only available in the view, they will not be added to the underlying data source. 

 This was today’s skill pill, thank you! 

 The dashboard in Tableau Public:

 

Watch the video tutorial here:

 

About btProvider:

We hold all possible technical and sales certifications for all products:

Tableau Desktop, Tableau Public, Tableau Server, Tableau Prep, and Tableau Data Management.

With Tableau Software – the best data visualization platform – you can always understand your business or your job better. Using Tableau, you will take intelligent and strategic decisions and quickly understand the data flow, numbers and the results it produces. See other #skillpill video tutorials here:

How to display multiple insights on a dashboard in #Tableau

How to create Stacked Bars on Grand Totals in Tableau

How to create a Buffer Zoom in a Tableau Map

Are you interested in learning more about Tableau Software – one of the best analytics tools and implementing the solution in the entire company? 

Contact us!

See how Tableau works, by downloading a free trial here: