11 Replies Latest reply on Oct 5, 2017 7:53 AM by Shinichiro Murakami

    Weighted average by dimension as a calculated field

    Melody Liu

      Say I have data set up like this:

       

      IDCountPrice
      A210
      A111
      B430
      A112
      C53
      B331
      C54
      B433

       

      I'd like to find the weighted average of each ID, and return it as a separate column, as in this:

      IDCountPriceWAVG
      A21010.75
      A11110.75
      B43031.36
      A11210.75
      C533.5
      B33131.36
      C543.5
      B43331.36

       

      Using { FIXED [ID]  : AVG(PRICE) } kind of works (although it's not weighted), but I need to be able to return the average as a calculated field and not just as an LOD expression.

       

      Any suggestions?