Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Everybody,
I have a requirement where i need to to get sum(SalesNetPrice) between two month-year field ,
between Start_Year and End_Year.
i.e)Start_Year have values "Jan-2013" corresponding "End_Year" have values "Dec-2013 ".
I need to calculate sum( SalesNetPrice) .with condition SalesDate_MonthYear in the range start_Year and End_yea
Currently am tried the below expression which is not working
Expression :
=Sum({<SalesDate_MonthYear={">=$(StartYear) <=$(EndYear)"}>} SalesNetPrice)
Thanks in Advance,
Priya
try this:
Sum({<SalesDate_MonthYear={">=$(=date(StartYear)) <=$(=date(EndYear))"}>} SalesNetPrice)
Hello,
sum ({<SalesDate_MonthYear= {"<=$(=date(EndYear))>=$(=date(StartYear)"} > } SalesNetPrice)
Maybe using the date() function may help in this case.
Regards.
No its not working since Start & End Year are not date field.
Hi,
what type of fields are they?
try this then:
Sum({<SalesDate_MonthYear={">=$(=date(StartYear),'MMM-YYYY') <=$(=date(EndYear),'MMM-YYYY')"}>} SalesNetPrice)
which values do you have in SalesDate_MonthYear ?
StartYear and EndYear are variables...so change their definition
Date(min(Datefield),'MMM-YYYY') as StartYear
Date(max(Datefield),'MMM-YYYY') as EndYear
and then try that
The Values in SalesDate_MonthYear are 'Jan-2004'...'Oct-2013'
so the values in startyear and endyear should be the in the same, if not you can change their format using makedate,