Sometimes in Tableau, it can be hard to control axes as you’d like, and it can be difficult to get the right number format on the axis if you are allowing users to set Measures based on parameters.
Andy Kriebel addresses the challenging issue of dynamically adjusting the axis number format based on the type of Measure selected (percentage, currency, decimal places etc.)
Andy Kriebel blogged about using Parameters to allow users flexibility to select from a range of Measures
The Tableau Knowledge Base also documented this process:
It’s Chris Love‘s #MakeoverMonday Arms Race example again! His dashboard allows users to choose whether to show Imports as a percentage, or as a Value. In order to format the axis, some calculations were required: