2 Replies Latest reply: Jan 8, 2013 7:33 AM by Vishwaranjan Kumar RSS

    How to median(Distinct x)

      Hi

       

      I have to produce avg and median results for my data. The avg is only correct if I do avg(distinct x). but you can not distinct median.

      I want median revenue of a salesman but the problem is a sales man can have multiple regions. So table shows the salesmans revenue as a separate field for each region. I am having the same problem with the stdev() function, does anyone know of a workaround?

       

      SalesmanRegionTotal Revenue
      JohnNewyork233
      JohnTexas233
      JohnBoltimore233
      MikeNewyork506
      MikeNebraska506
      BenTexas125

       

      the Avg should be (233+506+125)/3

      Median should be 233.