2 Replies Latest reply on Nov 23, 2018 1:58 PM by Paul Wachtler

    Swap Measures Using Parameters - How To Format Axis For Different Value Selections

    Jeffrey Alexander

      Please see sheet "MultiSelector" in the attached

       

      I want to set up a sheet where the user can select a value from the dropdown and that is the value that will appear on the graph.

       

      If the user selects "HR", I want to display total home runs on the Y axis, if the user selects "Batting Average", I want to display the batting average

       

      The problem is that I want HR displayed in integers and batting average as a percentage value., but the axis disregards the default format for batting average and I can't figure out how to dynamically change it

       

      I used the methodology described in

       

      Example – Swap Measures Using Parameters - Tableau

       

      And I did the following steps

       

      1. Create the parameters
      2. Create calculated fields to change the measures in the view
      3. Set up the view

       

      I created the parameters as:

       

       

      And then the calculated fields for the view

       

      And then I set up the view:

       

       

      The problem is that I want the Y-Axis to display in Percent format when "Batting Average" is selected and Integer format when "HR" is selected (as is the default format for those values).

       

      How can I change the formatting of numbers on the Y axis based on the parameter selected?

       

      Thanks