0 Replies Latest reply: Sep 9, 2012 1:05 AM by Vivekananthan Nalliah RSS

    Showing previous quarter value

      I'm creating a balance sheet report and once the year and quarter input box is set, i need to show balanace until the specified quarter for previous year, balance for the specified year until previous quarter and also balance from current year until the specifiesd quarter.


      Since the quarter that user specifies is in string value i'm having a difficult time in minusing the quearters.



      First Expression : sum(if(PostingYear=ReportingYear-1 and PostingQuarter<=ReportingQuarter, Amount))/1000  (The values for this are correct)


      (The values for the below are not showing correctrly)

      Second Expression: sum(if(PostingYear<=ReportingYear and PostingQuarter<ReportingQuarter, Amount))/1000


      Third Expression: sum(if(PostingYear<=ReportingYear and PostingQuarter<=ReportingQuarter, Amount))/1000



      Can anyone help me on this or any other suggestions to do this better are welcomed.