9
votes

I have Tableau report where I am showing data by category in columns.

The table shows all columns when there is no filter on data. But when filter is applied, some of the categories do not have data, so table shrinks, hiding columns without data

Is there a way to always show columns regardless of data or not in that column?

Please see screenshots below.

enter image description here

4
This can be annoying, especially with bars across time. I don't have an answer right awayInox

4 Answers

9
votes

Go to Analysis >Table layout> Show columns with no data or Analysis>Table layout>Show rows with no data

1
votes

The next step depends on whether your "disappearing" fields are dimensions or measures.

If you want to force the display of members for specific dimensions, then one (kind of complex) solution is to use an advanced Tableau feature called data blending to force the existence of dimension members, even if there are no related measure values. The trick is to make a simple data source, say a text file, that lists the members of each dimension. Use that source as the primary data source, and make the original data source the secondary source.

1
votes

Go to Analysis >Table layout> Show columns with no data or Analysis>Table layout>Show rows with no data

Also You can right click on header and select show missing values if you are using line chart.

0
votes

Solution 1: (When you’re working with Dates or Numeric bins)

  • Right click on the numerical or Date column to extrapolate the missing values. As you notice in the lower part of the screenshot, this will not work on Categorical data !

enter image description here

Solution 2: Categorical Data

  • As indicated in the accepted answer, Analysis > Table Layout > Show Empty Rows will get you the same result for Categorical (Text) Data

Solution 3: Calculated Columns

  • If for some reason, none of the 2 above point & click solutions work, you can create calculated columns to calculate the measure for each of the Categories with the below formula and then line them up on the Columns to achieve the same result
Profit (Category 1)

IF MyColumn = "Category 1" THEN
Profit
ELSE
NULL
END
Profit (Category 2)

IF MyColumn = "Category 2" THEN
Profit
ELSE
NULL
END

Not the most convenient solution when you have hundreds of unique values in your column, but nevertheless a workaround !