KNOWLEDGE BASE

Showing Total and Year in Headers per Pane


Published: 06 Jan 2017
Last Modified Date: 03 Apr 2017

Question

How to include a year and total sum in a header for each discrete pane for line graphs on a view.

Environment

  • Tableau Desktop 10.1.1
  • Windows 10
  • PostgreSQL

Answer

The below steps can be reviewed into the attached workbook Year and Total in Header. Starting with a workbook using sample Superstore data and the following placements for the view:
  • Year(Order Date) and Month(Order Date) on the columns shelf and set to Discrete
  • Sum(Sales) on the rows shelf and set to Continuous

To add the yearly sales to the header per pane containing each year:
  1. Create a calculated field {FIXED YEAR([Order Date]): SUM([Sales])}
  2. Place the calculated field on the columns shelf.
  3. Right-click the pill for the calculated field on the columns shelf and select Discrete.
  4. Drag and drop the pill for the calculated field to the place between Year(Order Date) and Month(Order Date) on the columns shelf.
  5. Right-click on a total in the header, select Format, and in the Format pane by Numbers select Currency (Standard) from the drop-down menu.

Additional Information

Headers are created when you place a dimension or discrete field on the Rows shelf or the Columns shelves, for more information see Headers.
Did this article resolve the issue?