Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all
Can any one explain about YearToDate()...?
Thanks
YearToDate(date [ , yearoffset [ , firstmonth [ , todaydate] ] ])
Returns true if a date falls within the year to date, else false. If none of the optional parameters are used, the year to date means any date within one calender year from January 1 up to and including the date of the last script execution.
Hi avinash
Can you tell me how this expression works.
I am trying to find YeartoDate Dynamically
-Sum(Sales * YearToDate(Date, 0, 4, vYEDate))
the value of vYEDate=41364(31st march 2013)
I have never used it like this, but that should work - it will give all sales in FY 2012/3. Is that what you want? What are you getting?
i hope this attachment is more useful for you
Tripati
Could you use a flag field in the load script?... something like:
Load
SaleDate,
SaleAmt,
if( DayNumberOfYear(SaleDate) < DayNumberOfYear(date(now())), 1, 0) as as [SalesYTD]
Then in in your expression
Sum({$<[SalesYTD]={1}>} SaleAmt)
This would be 'dynamic' - per each reload...
Just two cents
Jarrell