BASE DE CONNAISSANCES

How to Add File Name / Sheet Name/ Table Name as Columns in Tableau


Date de publication : 24 Nov 2022
Date de dernière modification : 09 Dec 2022

Question

How to show the File Name / Sheet Name/ Table Name as a field in Tableau Desktop / Tableau Prep?

For example, when adding data in Tableau, how to show the file name or table names as column data. 
e.g. add the [2022_DATA] and [sample data] as 2 fields in Tableau.
User-added image
 

Environnement

  • Tableau Prep Builder
  • Tableau Desktop

Réponse

In Tableau Desktop

1. Right-click the data in canvas and select [Convert to Union]
User-added image

2. In the pop-up window, move to the [Wildcard] tab and click [OK]
User-added image

3. Check that 2 columns for the file name and sheet name are added to the data.
User-added image

In Tableau Prep Builder

1. Add the data to Tableau Prep Builder and in the Input Step, move to the [Table] tab.
User-added image

2. Click [Union multiple tables] and click [OK].
User-added image

3. Check that 2 columns for the file name and sheet name are automatically added to the data.
User-added image
Cet article vous a-t-il permis de résoudre le problème ?