A Special Counting and Labeling Technique in #Tableau

Introduction

Although Tableau gives us many ways of counting and labeling data points on the charts we create, every once in a while we have to be creative to get the counting and labeling the way we want it to be.  This post shows one example that required me to be a little creative to get the counting and labeling the way I wanted it to be on a time series chart of daily production data.


If you like this article and would like to see more of what I write, please subscribe to my blog by taking 5 seconds to enter your email address below. It is free and it motivates me to continue writing, so thanks!

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.


The Example

Figure 1 shows example time series data that can represent many things that can be quantified with a binary counter.   In this example, let’s assume this data represents the daily production levels of widgets for various client accounts.  On any given day, widgets go into production for certain accounts but they are not always created within a work day, so the daily count is either a 0 (not finished) or 1 (finished).  Sometimes it takes a while for the widget order to be completed because of the specifications given for the widgets (some are harder to produce than others). For production data like this, to generate a daily total production count is not as simple as creating a histogram because the histogram only gives you a count of 1 or 0 and there are multiple records per day.  Figure 2 shows what the daily widget production data looks like in a time series plot in Tableau.

Figure 1 - Widget Production Data.

Figure 1 – Widget Production Data.

 

Figure 2 - Time Series of Widget Production Data.

Figure 2 – Time Series of Widget Production Data.

In this example,  several months of daily widget production data are examined.  The challenge of this example is to be able to examine the time series history of each production level (0, 1, 2 …5) separately. To accomplish this, a special technique for counting and labeling each daily production level was developed.

The Counting and Labeling Technique For The Entire Production History

Examining the entire production history is easy simply by using an index function to label the daily production levels (Figure 3) and a running total (Figure 4) to show how many widgets were produced over time.

Figure 3 - Index Is Used To Label the Consecutive Production Days.

Figure 3 – Index Is Used To Label the Consecutive Production Days.

Figure 4 - Running Total of Widget Production Over Time.

Figure 4 – Running Total of Widget Production Over Time.

As shown in Figure 3, the daily production rate varies from 0 to 5 widgets per day.  As shown on Figure 4, the overall production rate is generally linear with a average of 1.3 widgets produced per day.  In total, there were 303 widgets produced in 237 production days.

The Counting and Labeling Technique For Each Daily Production Level

To examine production performance, it might be useful to look at the production data at discrete levels.  For example, Figure 5 shows the production data for all eight days where 4 widgets were produced.

Figure 5 - The Counting and Labeling of Four Widget Production Days.

Figure 5 – The Counting and Labeling of Four Widget Production Days (8 days total).

Figure 6 shows the running total of eight, 4-widget production days (32 total widgets produced).  This chart shows that a long time was needed to achieve the second,  4-widget production day. There also was a period of high production from the fifth to seventh day of 4-widget production days.  It seems that either something was improved in the production process during this time or that the crews were able to somehow successfully create four widgets per day on those occasions by really concentrating on multiple jobs.

Figure 6 - Running Total of 4-Widget Production Days.

Figure 6 – Running Total of 4-Widget Production Days.

Video 1 shows how the calculated fields are set-up in Tableau to examine the production data for any of the discrete production levels (0 to 5 widgets per day).  A parameter is used to choose the production level of interest (0-5) and the time series and running total charts are counted and labeled as shown in Figures 5 and 6.  One nice feature about this technique is that the counting and labeling technique will work for any time period selected (using the time sliders) in the analysis.

 

 

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.