KNOWLEDGE BASE

Pivot Calculated Fields


Published: 15 Oct 2018
Last modified date: 15 Aug 2023

Question

How to pivot on calculated fields, including split fields

Environment

  • Tableau Prep

Answer

The attached "split then pivot prep flow.tfl" demonstrates the following directions:
  1. Open Tableau Prep and connect to the original data source
  2. Hover over Original Data, click the plus (+), and select Add Step
  3. In Clean 1, right-click the field containing the list of values, this example uses [Pet Name], and select Split Values > Custom Split
  4. In the Custom Split dialog, do the following:
    • Enter the separator, which is ,
    • For Split off, select All
    • Click Split
  5. Hover over Clean 1, click the plus (+), and select Add Pivot
  6. Drag [Pet Name - Split 1], [Pet Name - Split 2], and [Pet Name - Split 3] to the Pivot1 Values column
  7. Hover over Pivot 1, click the plus (+), and select Add Output
  8. In Output, run the flow
Did this article resolve the issue?