Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi all
how to write YTD MTD in single experssion?
Can you give us some more background on the issue? Generally, YTD and MTD are found in the 'Calendar' portions of your data model. And to accomplish that, I have something like this.
LET vToday = today();
Calendar:
Load
...
InWeek(TempDate, '$(vToday)', 0) * -1 AS CalCurrentWeek,
InMonth(TempDate, '$(vToday)', 0) * -1 AS CalCurrentMonth,
InYear(TempDate, '$(vToday)', 0) * -1 AS CalCurrentYear,
YeartoDate(TempDate)*-1 as CurYTDFlag,
....