2 Replies Latest reply on Sep 28, 2016 11:58 AM by Robert Peternel

    How do I Decile in Tableau?

    Robert Peternel

      I am looking to figure out how to Decile in Tableau. Basically this is what I have and what I want to do:


      I am working with pharmacy prescription data. Lets say I have 10,000 doctors writing a product and I want to put them into a Decile bucket based on how much volume they are prescribing. Here's how I would do it in excel.


      1. Sort the list of 10,000 doctors by their volume, largest to smallest

      2. Now create a second column that does a running total of their data (taking the person before you and adding on the next person's volume and so on)

      3. Take the final running total number (which should be the total volume for all 10,000 doctors) and divide by 10. The number I get will be the total volume that would be in each bucket, or Decile.

      4. Now I assign a Decile to each doctor depending on how much volume they have

           ex: Total volume for 10,000 doctors is 1,000,000 scripts. That means for each Decile, it would contain 100,000 scripts. Decile 1 has 50 people that account for the 1st 100,000, Decile 2 has 85 people that account for the next 100,000, Decile 3 has 125 people that account for the next 100,000 and so on.


      I want to be able to a) put those doctors in the correct bucket and b) identify who those doctors are in each Decile.


      How can I do that in Tableau?

      Thank you in advance!!