4 Replies Latest reply on Jun 22, 2016 4:32 PM by Scott Pantoskey

    Creating a Parameter with Decimal Step Size

    Scott Pantoskey

      Hi,

       

      How do you create a parameter with a decimal for step size? Specifically, I want to create an 'integer' parameter with the a range for allowable values. I want the range to look like this: minimum=0.18; maximum = 2; step size = .01. I tried doing this but the step size always switches back to '1'.

       

      Is this possible? Thanks in advance for your help!

       

      Best,

       

      Scott

        • 1. Re: Creating a Parameter with Decimal Step Size
          Matt Lutton

          Hi Scott,

           

          You'd need to set the data type to "Float", as integers only allow for whole numbers.

           

          Data Types in Tableau: Data Types

           

          Let me know if this helps!

          1 of 1 people found this helpful
          • 2. Re: Creating a Parameter with Decimal Step Size
            Scott Pantoskey

            Matt, you did it again!! I really appreciate all your help!

             

            You may be able to help me with a bigger question that I have. Basically, I am trying to assign a numerical (decimal) value to each customer name. Afterwards, I am hoping to create a new measure by multiplying this assigned decimal by sales. I am hoping to display this assigned decimal as well as the new calculation (decimal x sales) in the viz.

             

            I started by creating this parameter (which you helped me with) with the following details: float, min: 0; max: 2; step size: .01

             

            Then, I created a calculated field to define this parameter with the following formatting:

            IF [Customer Name] = 'Max Jones' THEN 0.15

            ELSEIF [Customer Name] = 'Scott Alexander' THEN 0.18

            ELSEIF [Customer Name] = 'Alex Boost' THEN 0.20

            ETC

            END

             

            Although, when I drag that field into the view, it does not show up as the decimal value and shows up as a random integer. Do you know what I am doing wrong/Perhaps, there is a better way to accomplish this?

             

            Thanks again for all your help!!

            • 3. Re: Creating a Parameter with Decimal Step Size
              Matt Lutton

              Try right clicking on the calculated field in the view, and change the "Format" to be a decimal number. Alternatively, you can set the "Default Properties" on that calculated field to have a "Number Format" that includes decimals.  The data type on the new calculated field should also be "Float" which you can toggle by right clicking on the field in the data pane.

               

              Let me know if this helps!

              1 of 1 people found this helpful
              • 4. Re: Creating a Parameter with Decimal Step Size
                Scott Pantoskey

                I'm still having trouble unfortunately. As you can see in the attached workbook, it is randomly assigning Karl Braun an integer rather than the correct decimal. Do you have any idea why this is occuring?

                 

                Thanks again for your continued help, Matt!!