6 Replies Latest reply: Dec 7, 2016 3:33 AM by Vincent Dubois RSS

    Set analytics - calculate a rate, problem with filtering

    Vincent Dubois

      Hello,

       

      Below my data set:

       

      NameAmountObjective
      6020
      Player1100
      Player2100
      Player31010
      Player41010
      Player5100
      Player6100

       

      I would like to calculate in a text object "SUM(Amount) over SUM(Objective)" to show a global achievment rate.

      But I want to calculate this only for players who have an objective, in my example: only player 3 and player 4 must be used => 20 /20 => 100%

      I don't manage to get the good result with these expressions:

      - sum({<Objective={'>0'}>Amount)/Sum(Objective)

      - If(Objective>0,sum(Amount)/Sum(Objective))

       

      Either it gives me: 60/20 => 300% (by summing all players), or it gives me 0%

       

      Do you have any suggestions ?

      Thanks.