10 Replies Latest reply: May 16, 2016 6:04 AM by Sunny Talwar RSS

    How to replace GL_CODE=50010 with sTOCK field ?

    Yeo Poh sai

      Hi All


      My Table 1 expression work fine :-


      Above(RangeSum(Above(Sum({<year, month , GL_CODE = {50010}>}[Amount]*1), 0, RowNo()))),
      -Sum({<GL_CODE = {50010}>}TOTAL Aggr(Sum({<year, month, GL_CODE = {50010}>}[Amount]*1), YearMonth))), (YearMonth, (NUMERIC, DESCENDING))))
      /Count(distinct YearMonth)


      I have create a field sTOCK using load script :-

      If([Reporting Code]>=50010 and [Reporting Code]<=50010,'sTOCK') as [sTOCK],


      May i know how to convert the above expression using sTOCK instead of GL_CODE=50010 ?