3 Replies Latest reply on Jun 30, 2017 2:36 AM by K Chandler

    Calculating Upper and Lower Quartiles

    Kenneth Mockler

      Hello all,


      Ok, can anyone please help me display a basic upper and lower Quartile measure in a table layout within Tableau? I have found a few topics on this subject (mainly this one) but don't fully understand the calc description. I have quarantined an abbreviated data set below and this is the layout I'm looking to mimic right now


      Header 1Header 2Header 3
      Lower QuartileUpper Quartile



      Any help would be greatly appreciated!


        • 1. Re: Calculating Upper and Lower Quartiles
          Jonathan Drummey

          There were two measures in your data file, I used the Addressed measure:


          2015-06-10 10_14_41-Tableau - quartiles using percentile().png

          To build the view, once I put KPI on the Rows Shelf I dragged Addressed from the Measures window to the Text shelf. This automatically applies the SUM() aggregation. Then I clicked on the SUM(Addressed) pill on the Text Shelf and changed it to Percentile25:


          2015-06-10 10_16_00-Tableau - quartiles using percentile().png


          Then I dragged another instance of the Addressed field onto the data area and dropped it when the display said "Show Me:


          2015-06-10 10_17_02-Tableau - quartiles using percentile().png


          This creates a Measure Names/Values crosstab with the PCT25(Addressed) and SUM(Addressed) pills in the Measure Values Shelf. I could then change the SUM(Addressed) to PCT75(Addressed).


          That takes 8 mouse clicks (including rearranging the pills on Measure Values to sort them). The next step would be to right-click on each column label and change the alias as desired. Sample workbook is attached.



          3 of 3 people found this helpful
          • 2. Re: Calculating Upper and Lower Quartiles
            Kenneth Mockler

            Thank you very much Jonathan! This is a much simpler route than what I was exploring.





            • 3. Re: Calculating Upper and Lower Quartiles
              K Chandler

              Just wanted to say thanks to Jonathan for detailing the steps he took to get to the final solution. Sometimes it can be a bit hard to work out what people have done when they only post the solution as a workbook (especially when there are more steps than in this example). Big thumbs up.