Monday, July 22, 2019

Dynamically change the Tableau data formats like % , $ and number using parameters


Dynamically format the number with %, $ or any other style based on selected Parameter value

The requirement is to dynamically change the number format based on parameter value.
For instance, Parameter has got two values Revenue and Quantity.
When Revenue is selected report must show % symbol and on selecting parameter value to Quantity the same report should show Number

To achieve this, we need to create a parameter




Create a calculated field to drive the parameter selection
Another calculation for quantity

Drop these two calculated fields on Text marks

Essentially, what we did here is setting Null for quantity when Revenue is selected through parameter and the other way for Quantity. We can add as many number formats as we wish to this just by making other values null.

No comments:

Post a Comment