KNOWLEDGE BASE

How to Export Cross-tabs with Multiple Values in A Single Cell, Including Date Type Fields, to A Flat File Vertically


Published: 10 May 2022
Last Modified Date: 08 Jul 2022

Question

In a cross-tabs, adding a Date type field (dimension) to the Mark card causes it to be exported in a separate column.
How to export cross-tabs with multiple values in a single cell, including Date type fields, to Excel or csv vertically.

User-added image
User-added image

 

Environment

  • Tableau Desktop
  • Windows 10
  • Text Files

Answer

1. Create a calculation field to convert a Date type field to a Numeric:

DATEPART('year', [Order Date]) * 10000 + DATEPART('month', [Order Date]) * 100 + DATEPART('day', [Order Date])

2. Right-click the calculated field and select [Default Properties > Number Format > Number (Custom)]. Uncheck "Include thousands separators".

3. Drop the calculated field to Mark card.

4. Export.

User-added image 
User-added image
Did this article resolve the issue?