Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Need help with something.Please find attached
Notice the current year and the months(2nd quarter) selected but the the total recoveries includes the 1st quarter ie Jan,Feb and Mar and also the previous years.
Now i would want to separate the recoveries into previous years and the 1st quater
Try something like this
You can create a calendar with Quarters using,
DayNumberOfQuarter in your load statement, then in the set you can use that field to get max Quarter or previous Quarter.
// for Max Month recovery
Sum( {<Year=, Month =, MONTH_NAME = {"$(=MonthName(max(MONTH_NAME)))"} >} Recoveries)
// for max Year recovery
Sum( {<YEAR=, Month =, YEAR = {"$(=(max(YEAR)))"} >} >} Recoveries)
//for prev month recovery
sum({<YEAR=,
Month =,
MONTH_NAME = {"$(=MonthName(AddMonths(max(MONTH_NAME), -12)))"}
>} Recovery)
// for Last Year recovery
Sum( {<YEAR=,
Month =,
YEAR = {"$(=(max(YEAR)-1))"}
>} Recoveries)
regards
Ren