Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Normally YTD means it will calculate from January 1st to till date..
i)Is it possible to calculate a YTD from february to till date?
ii) Is it possible to calculate YTD from specific time like May20th of the year to till date?
Thank you
1)
For Current Year
SUM({<Year =, Quarter =, Month = , Date = {">=$(=MonthStart(YearStart(Today()),1))<=$(=Today())"}>}Sales)
or For Year of Selected Date
SUM({<Year =, Quarter =, Month = , Date = {">=$(=MonthStart(YearStart(Max(Date)),1))<=$(=Max(Date))"}>}Sales)
2)
SUM({<Year =, Quarter =, Month = , Date = {">=$(=Max(Date))<=$(=Today())"}>}Sales)
Thank you Manish.
But the start date and month for calculation should be 20th feb 2015(rather than year start and month start) and from that date I want to calculate till date.
Though this can be achievable in chart expressions, it is advisable to flag data as per your requirement in the script and use the flag in set expression. Something like below
If(Date>=YearStart(Today(),0,2)+19 and Date<=Today(),1,0) as YTD_FLG
Regards,
KKR
For Current Year
SUM({<Year =, Quarter =, Month = , Date = {">=$(=Date(MakeDate(Year(Today()),2,20)))<=$(=Date(Today()))"}>}Sales)
or For Year of Selected Date
SUM({<Year =, Quarter =, Month = , Date = {">=$(=Date(MakeDate(Year(Max(Date)),2,20)))<=$(=Date(Today()))"}>}Sales)
2)
SUM({<Year =, Quarter =, Month = , Date = {">=$(=Max(Date))<=$(=Today())"}>}Sales)