4 Replies Latest reply on Jun 27, 2017 3:45 AM by karthik k

    "Show Empty Columns" not recognized when working with Line Charts?

    Mark Isaacs

      It looks like the "Show Empty columns" does not work with line charts. 


      I have a very simple data file with dimensions for Year, State and Age Group, and one measure Counts.  When I generate a Line chart with all of the years in the view, for the single State Delaware, I see there is data in 2014 for age groups 80-84 and 90+, and no data for age group 85-89.  (See Line Chart 1.png).  When I remove the year 2016 from the view, the column for age group 85-89 is removed from the view and the chart for 2014 now shows a line segment connecting the points for 80-84 and 90+, rather than simply two distinct points. (See Line Chart 2.png).   "Show Empty Columns" checked, so it appears that Tableau is not recognizing that setting for this chart.


      If I change the Line chart to a Bar chart, the setting is recognized.  It thus looks like Tableau treats Line charts and Bar charts differently when it comes to showing empty columns.  Does anyone know why this would be the case, and if there is any way to get Tableau to recognize the "Show Empty Columns" setting for Line charts?


      I've attached a small workbook that has one tab with the Line chart and one with the Bar chart.

        • 1. Re: "Show Empty Columns" not recognized when working with Line Charts?
          Manideep Bhattacharyya

          Hello Mark - That's true. Even if I change the Table layout to show "Empty Rows" still show missing value doesn't work. It works well with Date type axis.


          Missing Values



          • 2. Re: "Show Empty Columns" not recognized when working with Line Charts?
            Jim Wahl

            This falls into the confusing and complex area of data densification ---  Tableau creating values where none exist.


            I usually try to avoid Tableau data densification by fixing the issue in the data with either a scaffold data source or modifying the data directly to include null or 0 values for the combinations of dimensions I need to display fully or to blend -- this is the most robust path against filtering and the various rules Tableau applies to missing data.


            But I did get your issue resolved by converting the age group field to a range-aware pill and then using show missing values.


            I'll describe what I think is happening below, but the basic technique is to

            1. convert age group to an integer using a case statement (

            CASE [Age Group]

            WHEN "10-14" THEN 1

            WHEN "15-19" THEN 2

            WHEN "20-24" THEN 3



            2. create a bin field with bin size 1 -- bins and dates are "range-aware" dimensions.

            Replace Age Group with this pill. After adding the pill to the view, right-click > Show Missing Values


            3. alias the bins from 1, 2, 3 back to 10-14, 15-19, 20-24, etc. Right click the field in the left data pane > Edit Aliases.


            Now you can filter the years and get both the complete set of age groups (domain padding using show missing values) and a break in the line where no data exists.



            Here's the longer version.


            • Tableau treats line, area and polygon mark types differently than other mark types such as bar graphs for data densification. I don't know why, but I assume Tableau is trying to do what usually works. I.e., people usually like their lines and area charts connected (even if it can cause confusion).
            • There are two general types of data densification:
              • Domain Completion --- show empty rows / columns is the easiest example.
              • Domain Padding --- show missing values on range-aware pills (dates and bins mostly)
            • In your example, domain completion is triggered with the show empty columns option in the Analysis > Table Layout menu.
              • But Tableau doesn't treat this as null for the purpose of the line graph formatting.
              • Not really sure why. But there is a deceptively complex order of operations behind Tableau's viz flow.
            • You can enable domain padding by using the context menu on a range-aware pill. Click Age Group Int Bin > show missing values.
              • For the purposes of marks, Tableau treats domain padded values as null and, therefore, you can use the line formatting to either break the lines or show the null values as zero.


            This isn't a perfect solution, as domain padding will aways show extra marks. For example, instead of using aliases you might try just dropping the age group dimension on the Columns thinking that becuase there is a 1-to-1 relationship between age-group and age-group int bin, you will get 1 age group mark for every bin. Turns out you get a complete set of age group bin marks for each age group.

            • 3. Re: "Show Empty Columns" not recognized when working with Line Charts?
              Mark Isaacs

              Jim, many thanks for this detailed reply.  This is really helpful, and is greatly appreciated!

              • 4. Re: "Show Empty Columns" not recognized when working with Line Charts?
                karthik k

                Hi Jim.,


                When I blend the different data sources, "Show empty Columns" and "Show empty rows" are disabled automatically.

                Can you pls help on this issue.Empty Columns Disabled.png