1 Reply Latest reply: Mar 9, 2010 6:25 PM by Kieran Boyce RSS

    Can you give explanation about variables and syntax (equal sign, quotes…) ?

    Franck ROBERT

      Variables are really useful.

      First I used them to store formulas that have to be used several times.

      It seems that they can be used for other reasons : (please feel free to correct me if I misunderstood !)

      - If I DON'T put a equal sign in the variable formula, it can be used for my first aim

      - If I DO put a equal sign in the variable formula, it can be used to do dynamic calculation that evaluate to only one value (if this variables in a table with one dimension, the variable provide the same value in all the lines)

       

      What I don't understand is « when shoud i use quotes in the expressions that are using variables ?"

      For example :

      Why an expression like that works :

      =$(Cout moyen par sortie) - '$(V_mediane)'

       

      Where as the following do NOT works :

      ='$(Cout moyen par sortie)' - $(V_mediane)

      =$(Cout moyen par sortie) - $(V_mediane)

       

      KNOWING THAT :

      $(Cout moyen par sortie) is defined by this formula -> Sum (MT_MASSE_SAL) / Sum (NB_SORTIES_MC)

      $(V_mediane) is defined by this formula -> =median(

      aggr(

      (sum(MT_VACS_MC) + sum(MT_MASSE_SAL))

      /

      sum(NB_SORTIES_MC), LIB_CENTRE

      )

      )

       

       

       

      Can you help ?

      Thanks a lot for your help !