Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I have a code where in like wise comparison is der with current year to last year...I have used the same code in two reports,
in one case i get right values where as in other report it shows the whole month sales for example today it is 5 th april insted of showing sales till 5th april for last year it is showing whole april 2012 sales...please help...
Thanks and Regards,
Rohit
The following is the code...
(SUM({$<FinancialYear=,MonthName=,FiscalYear={$(=max(FiscalYear)-1)}
,[Posting Date]={">=$(=MonthStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))<=$(=addmonths(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))"}
>}[Gross Sales Amount])
-
SUM({$<FinancialYear=,MonthName=,FiscalYear={$(=max(FiscalYear)-1)}
,[Posting Date]={">=$(=MonthStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))<=$(=addmonths(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))"}>}[Sales Return Amount])
-
fabs(SUM({$<FinancialYear=,MonthName=,FiscalYear={$(=max(FiscalYear)-1)}
,[Posting Date]={">=$(=MonthStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))<=$(=addmonths(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))"}
,[Is SRN]={0},[GL Code]={"4000001","4000002","4000003","4000004","4000005","4000006","4000007","4000008","4000010","5000015","5000013","5000014","5000016"}>} [Credit Note Amount]))
+
SUM({$<FinancialYear=,MonthName=,FiscalYear={$(=max(FiscalYear)-1)}
,[Posting Date]={">=$(=MonthStart(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))<=$(=addmonths(max({$<FiscalYear={$(=max(FiscalYear))}>}[Posting Date]),-12))"},
[GL Code]={"4000001","4000002","4000003","4000004","4000005","4000006","4000007","4000008","4000010","5000015","5000013","5000014","5000016"}>} [Debit Note Amount])
)/100000