Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
I have a calendar date data and want to calculate YTD over it. I am having highest date in it as '01-Aug-2015' so, I am considering that as my current date. I had used following expression for calculating the YTD:
'=sum({1 <CalendarDate= {">= YearStart(GetFieldSelections(CalendarDate)) <= $(=max(CalendarDate))"}>} sale)'
and if I passed a date as '01-Jun-2013', it brought me data for sale from '01-Apr-2012' i.e. the first date in my data to '01-Jun-2013' which, it should actually bring from '01-Jun-2013' to '01-Aug-2015' (highest date in my data).
So, I reversed the operators between dates in the above expression such as:
=sum({1 <CalendarDate= {"<= YearStart(GetFieldSelections(CalendarDate)) >= $(=max(CalendarDate))"}>} BSLAMC)
This gave me the data from '01-Jun-2013' to '01-Aug-2015' and I want it from '01-Jan-2013' to '01-Aug-2015'.
I don't understand where I am going wrong.
Any help would be greatly appreciated!
Thanks,
Madhura
Gysbert,
I so much interpreted it wrongly. Thanks for clearing things!
And am so sorry about causing so much confusion. Also, the previous expression works in that case whereas, this one gives data onwards the selected date. Both usable according to requirements.
Many Thanks!
Try like this
sum({1 <CalendarDate= {"<=$(=max(CalendarDate))"}>} sale)
Regards,
Jagan.