4 Replies Latest reply on Oct 15, 2015 2:19 AM by Nasrin Ahmed

    Creation of NUmber Range

    Ambi Nair

      Hi,

       

      I have database with company names and Headcount for each company.

      1) Idea is to create a Range to define the head count

       

      Range to be defined is below

       

      1 - 100

      101 - 250

      251 - 500

      501 - 1000

       

      2) Would want use these range as the global filter across sheets.

       

      Please help how to create the ranged in tableau and use them as filter.

      Attached is the excel data sheet

       

      Regards

      Udayambika Nair

        • 1. Re: Creation of NUmber Range
          Darren Evans

          Hi,

           

          This is pretty straight forward. I would recommend either doing this by creating a groups on the TOTAL_EMPLOYEES field. For instructions on this see the Tableau help pages and search for groups.

           

          The other option is to code it in a calculated field something like

           

          IF SUM(TOTAL_EMPLOYEES) > 0 AND SUM(TOTAL_EMPLOYEES) <= 100 THEN '0-100'

          ELSEIFSUM(TOTAL_EMPLOYEES) > 101 AND SUM(TOTAL_EMPLOYEES) <= 200 THEN '101-200'

          END

           

          Darren

          • 2. Re: Creation of NUmber Range
            Shankar Mishra

            I have same scenario but date wise sum of customer and invoice number

            so when i tried to make calcualted filed i have to add sum of amount which becomes aggregate function in tableau and goes to measure

            but for using calc filed as filter we have to transfer it in dimesnion

             

            please help me out

            • 3. Re: Creation of NUmber Range
              Philip Engelbrecht

              Hi,

               

              I am sure there would be other ways to do it, however what I would have done is:

               

              A) Create the grouping calculation:

              a.png

              Then create a parameter that holds all the options. Example for me it is “Be more careful” and “Drive Slower”. I named it "Selection"

               

              Then for the measure or dimension I want to use on my viz, I just make sure to use only the values selected by my parameter and grouping calculation:

               

              b.png

               

              Hope that helps

               

              Regards,

              • 4. Re: Creation of NUmber Range
                Nasrin Ahmed

                Hi

                you can use bins. Create a CF:Headcount as- {fixed Company:countd(Heads)} . Create a bin on headcount size 100. Use this bin as filter!