2 Replies Latest reply: Nov 29, 2012 3:13 PM by Celambarasan Adhimulam RSS

    Copying October's YTD value for November & December



      I have an expression which calculates the YTD value as follows:


      num(sum({$<YEAR={$(vMaxYear)},MONTH_NO={'<=$(vMaxMonth)'}, MONTH=>}ABC_Flag)/sum({$<YEAR={$(vMaxYear)},MONTH_NO={'<=$(vMaxMonth)'}, MONTH=>}Total_Flag),'#,##0.0%')


      MONTH is a list box in the document and the YTD changes based on the MONTH selected. MONTH='Sep' or any other month before Sep


      This works perfectly fine. Here vMaxYear=2012, vMaxMonth=max(MONTH_NO) where MONTH_NO is 9 if 'Sep' is selected.


      I want this expression to show September's value when I select Oct/Nov/Dec as MONTH. I mean my values are freezed till Sep, and this expression should only evaluate to YTD(Sep) value even if I select Oct/Nov/Dec from the list box. Please guide me how to do this. I can't really find a way. The Monthly value for the same expression for the month of October/November/December can be ignored.


      Would appreciate all help at the earliest.