If there is more than one measure or dimension in the view, the blank column cannot be hidden without also hiding all instances of that Dimension value. For example, hiding one Q1 column will hide the Q1 column for all years. Use the following workaround if there is only a measure or a dimension in the view.
Note: This solution will hide every column with the same dimension value, for example all "2016" columns. To hide only one instance of a dimension value, for example only "Consumer 2016", see Hide Only One Instance of Sub-Category column
The following workaround was provided in the Community and found helpful by multiple readers: How to hide a column when showing percent difference.
index()!=1The attached example workbook uses the sample data set Superstore to demonstrate the following directions:
IF [Segment] = "Consumer" THEN [Profit] END
WINDOW_MIN( SUM([Corporate Sales ])) - WINDOW_MIN( SUM([Consumer Sales]))
Pivot Measure Values in Tableau Prep. Note: Calculated fields cannot be pivoted in Tableau Desktop, so the pivoting must be done in Tableau Prep.
Create the View in Tableau Desktop
IF MIN([Pivot1 Names]) = 'Sales' THEN SUM([Sales]) ELSEIF MIN([Pivot1 Names]) = 'Dummy Measure' THEN ZN(LOOKUP(SUM([Sales]),-1)) - (LOOKUP(SUM([Sales]),-3)) END
IF MIN([Pivot1 Names]) = 'Dummy Measure' THEN [New Measure Values] END
001458133
1853 KB

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.