Last Modified Date: 13 Feb 2017
ResolutionIf you want one measure to display as a percentage and a second measure to display as currency, use the following workaround:
- Use a calculated field to convert the measures to strings, and then format the strings within the calculated field. The following formula provides a template that can be used for the calculated field:
CASE [<Measure Swapping Parameter>] WHEN '<Measure A>' THEN LEFT(STR(AVG([<Measure A>])*100), 3) + "%" WHEN '<Measure B>' then "$" + (if SUM([<Measure B>])>99999 THEN LEFT(STR(SUM([<Measure B>])), 3) + "," + MID(STR(SUM([<Measure B>])), 4, 3) END) END
- In the view, replace the parameter with the newly created calculated field.
CauseWhen measures are used in a parameter, the calculated field that generates the measure values for the parameter is considered a single field. As a result, it is not possible to format the individual measure values used in the parameter.
- InterWorks Blog: Extreme Viz Makeover with Tableau
- To voice your support for the inclusion of this feature in a future product release, add your vote to the following Community Idea: Pass-through number format for calculated fields based on a parameter.
Thank you for providing your feedback on the effectiveness of the article.
Open new Case
Training and Tutorials