to derive Previous Month

How to bring Previous Month Value when a report having 6 months (Current month+Previous 5 Months) data?

for example,A report has December,January,February,March,April,May. the report is refreshed for May Month. need to find out Current and Previous Month. for Current Month, we can derive a formula as =Max([Month object]) in report". but for Previous Month, how to derive? in my case, Previous Month is “April”. and when Current Month will be “January”, the formula should show the previous Month as “December”.

kindly help me on this.

thanks in advance


sivasankari.n (BOB member since 2010-04-22)

Hi,

Try a formula like this:

= FormatDate(RelativeDate(ToDate("2010 " + [Month object] + " 01";"yyyy Mmmm dd");-1);"Mmmm")

I have not tested it so if it does not work it should give you at least in idea how to do it.


Marek Chladny :slovakia: (BOB member since 2003-11-27)