知识库

How to Apply Different Format to the Same Measure Field for Axis and Tooltip without Duplicating It


发布时间: 24 Feb 2023
上次修改日期: 27 Feb 2023

问题

How to apply different format to the same measure field for axis and tooltip without duplicating it? If the data source has a log of data, duplicating it can slow performance.

环境

  • Tableau Desktop

答案

If you change the field to an ad-hoc calculation, you can apply different format.

1. Add the measure field to Tooltip.
2. Double-click the field in Marks card, and change it to an ad-hoc calculation. (e.g. [Measure Field] * 1 )
3. Right-click the filed in Marks card and select Format.
4. In Format pane, open Pane tab and change Default > Numbers format.
5. Click Tooltip in Marks card and edit the content as you need.

In the attached workbook, Profit Ratio displayed to 2 decimal places on Y-axis and 4 decimal places in tooltip.
此文章是否已解决问题?