知识库

How to Check All the Fields Used in Calculated Fields


发布时间: 07 Feb 2024
上次修改日期: 08 Feb 2024

问题

How can you check which fields (Measures or Dimensions) in the data source are used in calculated fields without opening them one by one?

In the below sample, there are 3 calculations in this data source.  We want to know how to check the calculation details of each one other than opening them one by one?

User-added image
 

环境

  • Tableau Desktop

答案

The steps below unpackage a workbook and look at XML code, which is not supported by Tableau, but can provide the solution to view all the fields used in calculations.

1. Make a copy of the workbook and change the file name from [XXX.twbx] to [XXX.zip].  Make a copy of the workbook to ensure no accidental edits render the workbook invalid.  A .TWB file does not need to be changed to a .zip file but a copy of the original should be used.
2. Unzip the workbook copy file in Step 1 and open the unpackaged  [XXX.twb] file in a text or XML editor such as Notepad or Sublime.
3. Search for the keyword "caption" to find the calculated fields.  Following the caption is the "formula" keyword which will list the calculation used and the data fields.


User-added image

Please check the sample packaged workbook found in the Attachments section, .twbx and .twb file to test an example workbook.
此文章是否已解决问题?