1 Reply Latest reply: May 21, 2016 8:49 AM by PAUL YEO RSS

    How to make my last year stock amount display as 1,430,980 ?

    PAUL YEO

      Hi All

       

       

      Below expression for monthly stock amount at Table 1 work fine. it can display stock amount by month from now till last yr.

       

       

      =Money(

      RangeSum(Above(RangeSum(Above(Sum({<year, GL_CODE = {50010}, SOURCE = {TDSS}, month>}[Amount]*-1), 0, RowNo()))),

      -Sum(TOTAL Aggr(Sum({<year, SOURCE = {TDSS}, GL_CODE = {50010}, month>}[Amount]*1), YearMonth)))

      , $(vMoneyFormatK_GL))

       

       

      I also have a expreesion below from Table 2 , which display last year same period stock amount :-

       

       

      RangeSum(Sum({<year, month, GL_CODE = {50010}>}[Amount]*-1),

      Sum({<year, month, GL_CODE = {50010}, YearMonth = {"=YearMonth > AddYears(Max(TOTAL YearMonth), -1) and YearMonth <= Max(TOTAL YearMonth)"}>}[Amount]*-1))

       

       

       

       

      it Display the amount 1,538,090.37 which is wrong.

       

       

      May i know how to make it display as amount shown in Table April 1,430,984 ?

       

       

      Paul