3 Replies Latest reply: Dec 30, 2012 6:00 AM by Managing Director. Syfur Rahaman

Current year and previous year fiscal year calculation(July-June)

Hi everyone,

When I select year -2010 and Month - Feb

then current year data is 2010 july to 2011 feb(getting right data) and

prevoius year data is 2009 july to 2010 feb(getting data from 2009 july to 2010 june(its worng data)).

My current year expression is -

=num(sum({\$<Year1 = {\$(=max(Year1))}, MonthName = {"<=\$(=max({<Year1={\$(=max(Year1))}>} MonthName))"}>} if(PARTICODE=500 or PARTICODE=600 or PARTICODE=610 or PARTICODE=640 or PARTICODE=645 or PARTICODE=650 or PARTICODE=655, ActualAmount2)))

and its working fine.

But previous year calculation expression is -

=num(sum({\$<Year1={\$(=Year(Max(Year1))-1)}, MonthName = {"<=\$(=max({<Year1={\$(=max(Year1))}>} MonthName))"}>}  if(PARTICODE=500 or PARTICODE=600 or PARTICODE=610 or PARTICODE=640 or PARTICODE=645 or PARTICODE=650 or PARTICODE=655, ActualAmount2)))

Thanks

• Re: Current year and previous year fiscal year calculation(July-June)

try this for previous year

sum(yearname(yearname(today()-1))ActualAmount2)

hope it helps

• Re: Current year and previous year fiscal year calculation(July-June)

If your monthname is of format "Dec 2012", "Nov 2012" .... then

try Current selection year

Sum(<YEAR=, Month =, MONTH_NAME = {"\$(=MonthName(max(MONTH_NAME)))"} >} ActualValue2)

Previous Year

Sum( {<YEAR=, Month =,MONTH_NAME = {"\$(=MonthName(AddMonths(max(MONTH_NAME), -12)))"}>} ActualValue2)

• Re: Current year and previous year fiscal year calculation(July-June)

Hi renjithpl,

thanks for the prompt reply.I tried with your script but it didn't work.it shows only selected previous year month sum.

thanks