3 Replies Latest reply: Sep 3, 2014 11:59 AM by norsysEnnevelin norsysEnnevelin RSS

    Problem with Avg function

      Hello Everybody,

      I have a problem with my following expression :

      I'm trying to make a custom multiple list with the following expression :

      if(ESMS.CODE_CATEGORIE=200,10 * ($(v_pct_plafond)/100), $(v_capacite_au_01/01/N) *  avg (COUT_MOYEN_NATIONAL.COUT_MOYEN) * ($(v_pct_plafond)/100)).


      It doesn't work beacuse of the AVG function.


      When i replace the AVG expression with a constant, it works perfectly, i can choose any value as I want to.


      Can you please explain me why? Is there any solution to make it work with the avg function?

      We previously faced the same problem with sum() function and it seems that "aggr()" was the solution.


      But this time, it's a bit more complicated