4 Replies Latest reply: Mar 28, 2015 3:03 PM by Sunny Talwar RSS

    SET expression how to change from Sum to Average ?

    PAUL YEO

      Hi All

       

       

      I have the SET expression as below :-

       

       

      sum({$<year = {$(=max(year))}, month = {"<=$(=max({<year={$(=max(year))}>} month))"}>} (STK_AMT)/1000)

       

       

      it display Average stock amount  600 is wrong. I need it display average of Jan and Feb and Mar 2015 stock amount 600/3=200.

       

       

      What i need it when i click on month = Jan , it will display  100

      What i need it when i click on month = Feb , i want it will display 150

      What i need it when i click on month = Mar , i want it will display 200

       

       

      May i know how to modify the expression ?

       

      Enclosed my QV Doc

       

       

      Paul