1 Reply Latest reply on Mar 28, 2018 8:53 AM by Jim Dehner

    Help with Calculating Median for a Quarter

    Bianca Wessel

      Hello,

       

      I am trying to show median results by quarter, but once Tableau aggregates the data from monthly to quarter it is not giving me the desired outcome. I believe the issue is that when showing the quarterly information, it looks at the median of each single month. It is like it is doing median of median. For example for column A, the Oct 2015 median is $168K, Nov 2015 median is $170K, and Dec 2015 median is $159K. The to calculate the quarter, Tableau is saying that the median is $170K (mid figure between the 3 values shown above).

       

      Can I calculate the quarterly median looking at all data for Oct, Nov, and December, instead of using the monthly median? Below is an example of how the information is being calculated now.

       

      Thanks a lot for the help!

      Bianca

        • 1. Re: Help with Calculating Median for a Quarter
          Jim Dehner

          Good morning

          I'm confused on the median that you are trying to calculate - is it the median of the monthly values or daily values or some other dimension

          that said here is an example using superstore data

          if determines the median of the sub-category in the the quarter while the base chart shows the sum of sales by category

           

          this is the forumal

           

           

          it returns this

           

           

          Jim

           

          If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution.  Thank you.