PATH | Tableau Tips – How join line charts in tableau with missing data points

Posted on Posted in dicas tableau

In this tip, you will learn how to plot a Tableau line chart with missing data points. To do this, use a Superstore database.

When you work with dates or numeric shares, Tableau shows only the values that are represented in your data. If your data does not have the full range of values, the missing values will not be shown.

For example, in a simple data set that shows March 2017 sales.

As can be seen, not all dates are filled. We have no data against March 3, March 4 and some other dates. So, if we draw a line graph, we get:

Order date added to the label to make sure it is occurring. We can see that we have no data points for the missing days. This makes sense, since Tableau is not making up data and does not have a data point other than a null value. In this case, it probably make sense consider this days, such as $ 0 of sales, and the line chart should show that. Looking at the chart above, we are not seeing an accurate trend for our business.

To solve this case we need:

  • Step 1: Create a table calculation, with the following logic, so that it can basically “fill in the gaps” over a series of dates / times

Sales Calc: ZN(SUM([Sales])) * (IIF(Index () > 0, 1, 1))

  • Step 2: Filter the year 2017 and the month of March of Order date, then drag the field as continuous accurate data for column and sales field and Sales Calc field for row

  • Step 3: To have the desired analysis we need to click on the Order Date pill and select “Show Missing Values”

  • Step 4: Format your indicator, removing the grid lines and selecting a color for each brand card.

Final: Ready! You now know how to join Tableau line charts with missing data points.