6 Replies Latest reply on Sep 8, 2016 12:53 PM by Shinichiro Murakami

    Help needed with parameters

    Somok Sarkar

      Hello Everyone,

       

      I am currently facing an issue with the parameters where the requirement is to create a sequence for scoring.

       

      the current sequence is

        

      Value RangeScore
      00
        0 - 0.01020
      0.011 - 0.01840
      0.019 - 0.03160
      0.032 - 0.06180
      0.062 - 0.211 100

       

      But that's static. So I have to allow the user to create 6 parameters( to make it dynamic) so that he may play around with the various range and the the zip codes should get the score by lookup. PFA the excel sheet. There is just 2 columns.

       

      Can someone kindly advise me where there are any tricks to get this done in tableau?

        • 1. Re: Help needed with parameters
          Shinichiro Murakami

          Somok,

           

          I'm not sure what kind of static criteria you use, but you can change it dynamic with using LOD.

           

          for example

           

          IF  [Value] = 0 then 0

          ELSEIF [Value] > 0 AND [Value] <= 0.010 THEN 20

          elseif [Value] <{max([Value])}/4*1 THEN 40

          elseif [Value] <{max([Value])}/4*2 THEN 60

          elseif [Value] <{max([Value])}/4*3 THEN 80

          elseif [Value] >={max([Value])}/4*3 THEN 100

          else 0

          END

           

           

          If you can explain what kind of static criteria you will use, I think I can modify LOD calculation based on your needs.

          Min. median etc...

          Thanks,

          Shin

          • 2. Re: Help needed with parameters
            Somok Sarkar

            we have created the range based on the quantile method. so that the number of zip codes or the objects returned will have a close count. eg: apart from 0 the other category counts are within the range 164-180 each.

             

            now I need to allow the user to create each range. So in a parameter I can define a range and create a calculated field to assign the score.

            hence now I need to allow the user to control this 5 category individually.

             

            so now if he selects the category 1 parameter range 0 - 0.025

            the next parameter should allow the minimum to be 0.026 and maximum could be the max value within the window.

            • 3. Re: Help needed with parameters
              Somok Sarkar

              if there is any alternate approach apart from the parameters that would also suffice. however mainly I would like to make all these range user defined.

              • 4. Re: Help needed with parameters
                Shinichiro Murakami

                Here is one idea with combining percentile and minimum value.

                 

                 

                IF  [Value] = 0 then 0

                ELSEIF [Value] > 0 AND [Value] <= [Min Value] THEN 20

                elseif [Value] <{PERCENTILE([Value],0.25)} THEN 40

                elseif [Value] <{PERCENTILE([Value],0.50)} THEN 60

                elseif [Value] <{PERCENTILE([Value],0.75)} THEN 80

                elseif [Value] >={PERCENTILE([Value],0.75)} THEN 100

                else 0

                END

                 

                Thanks,

                Shin

                • 5. Re: Help needed with parameters
                  Somok Sarkar

                  Hi Shinichiro,

                   

                  that certainly helps, however the current range we have defined already follows the same method.

                   

                  now we are trying to go beyond this. so it should not be just quantile, but any user defined method.

                   

                  Regards

                  • 6. Re: Help needed with parameters
                    Shinichiro Murakami

                    I am getting confused with requirement.

                    What kind of criteria do you suppose?

                    That's really depends on what kind of criteria/calculation  you want to have.

                     

                    Thanks,

                    Shin