Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I had reqirement where i need to compare previous year and current year sales.so, when i make selection on finyear,month,date
the report need to show for all those three filters.
current year sales
sum({<SalesFY={$(=max(SalesFY))},SalesMonthOrder={"<= $(=max({<SalesFY={$(=max(SalesFY))}>}SalesMonthOrder))"},Month=>}Sales)
Previous year sales
sum({<SalesFY={$(=max(SalesFY)-1)},SalesMonthOrder={"<= $(=max({<SalesFY={$(=max(SalesFY)-1)}>}SalesMonthOrder))"},Month=>}Sales)
Thanks in advance
try something like
For Current Year
if( getselectedcount(finyear) >0 or getselectedcount(month) >0 or getselectedcount(date) >0,
sum(Sales),
sum({<SalesFY={$(=max(SalesFY))},SalesMonthOrder={"<= $(=max({<SalesFY={$(=max(SalesFY)-1)}>}SalesMonthOrder))"},Month=>}Sales) )
For PreviousYear
if( getselectedcount(finyear) >0 or getselectedcount(month) >0 or getselectedcount(date) >0,
sum(Sales),
sum({<SalesFY={$(=max(SalesFY))},SalesMonthOrder={"<= $(=max({<SalesFY={$(=max(SalesFY)-1)}>}SalesMonthOrder))"},Month=>}Sales) )
i think that is not correct because,when i select particular date i would like to see previous year and current year sales at a time.
lets say If you Have selected 13/4/2016 then what will be the output you need?
if select one particular date
As per your answer it will give only current year sales only not previous year sales.
Can you elaborate on what is the output currently shown and which expression is giving you wrong result ?. Also if you select a particular date then is your requirement for
CY --- >=Yearstartdate <= Selcted date
PY --- >=YearstartdatePY <= PYSelcted date
Also how the O/P should be when you select only Year,Month and not date . It would be better if you can attach a sample
Hi vijay,
do you have seperate fields for Year, Month, Day ??
ya kkkumar82
i mean i unqiue date fields for year ,month,date for the report