Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Can you please help me YTD() and MTD() functions with examples?
Month to date. The period of time from the 1st of the month until the current date. If current date is 21-03-2014
MTD = 01-03-2014
Week to date from the beginning of the week in which the date falls in, to the date
here a good example, using load script (master calendar) and set analysis
Hi.............
Thanx for ur reply............
Suppose date selected is 21-03-2014 then YTD is 01-01-2014 to 21-03-2014.What is the
MTD(21-03-2014)=?
WTD(21-03-2014)=?
Please help me?
Month to date. The period of time from the 1st of the month until the current date. If current date is 21-03-2014
MTD = 01-03-2014
Week to date from the beginning of the week in which the date falls in, to the date
Basic YTD and MTD calculation done by variables or SET expression you can try like
YTD Calculation:-
Sum({$< YourDatefield = {'>$(=Max((YearStart(YourDatefield)))) <=$(=Max(Today()))'}>} Metrics)
Or
Sum({$<Datefield = {'>$(vYearStart) <=$(vCurrentMonth)'}>} Metrics)
MTD Calculation:-
Sum({$<YourDatefield = {'>=$(=Max((MonthStart(YourDatefield)))) <=$(=Max(YourDatefield))'}>} Metrics)
Or
Sum({$<YourDatefield = {'>=$(=Max((MonthStart(Today())))) <=$(=Max(today()))'}>} Metrics)
Hi chandinig,
If you got correct answer from the thread so mark the thread as correct / Helpful for references
Regards,
Anand