Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Friends,
This is my expression: =sum({<BD_Year={'=$(vCurrentYear)'}>}Gross_Premium)
For above expression i am getting values like total sum for 2014. but i need upto this year current month total Gross_Premium.
Please help me
Hi,
You need to look at YTD amd MTD.
YTD Expression
=Sum({$<Datefield = {'>$(=Max((YearStart(Today())))) <=$(=Max(Today()))'}>} Sales)
Or
=Sum({$<Datefield = {'>$(=Max((YearStart(Datefield)))) <=$(=Max(Today()))'}>} Sales)
MTD Expression
=Sum({$<Datefield = {'>=$(=Max((MonthStart(Today())))) <=$(=Max(Today()))'}>} Sales)
Or
=Sum({$<Datefield = {'>=$(=Max((MonthStart(Datefield)))) <=$(=Max(Today()))'}>} Sales)
Regards
ASHFAQ
Try like this;
=sum({<BD_Year={"<=$(=MAX(PERIOD))"}>}Gross_Premium)
In the PERIOD place use your datefield which indicates the upto current month.
Regards,
Ajay
Hi,
You need to look at YTD amd MTD.
YTD Expression
=Sum({$<Datefield = {'>$(=Max((YearStart(Today())))) <=$(=Max(Today()))'}>} Sales)
Or
=Sum({$<Datefield = {'>$(=Max((YearStart(Datefield)))) <=$(=Max(Today()))'}>} Sales)
MTD Expression
=Sum({$<Datefield = {'>=$(=Max((MonthStart(Today())))) <=$(=Max(Today()))'}>} Sales)
Or
=Sum({$<Datefield = {'>=$(=Max((MonthStart(Datefield)))) <=$(=Max(Today()))'}>} Sales)
Regards
ASHFAQ
Thanks Mohammed
welcome
Regards
ASHFAQ
Hi Mohammed,
Same expression how to write in Script level..