Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am want to know is their any method where i can create MTD,PMTD,YTD,PMTD,WTD,PWTD etc through backend or in Calender?
I mean rather than creating expression at front end i can do it at backend itself and passing some flag in exp etc can able to achieve all.
Thanks
Regards
Abhay
Here you will find various examples to this topic and some more: How to use - Master-Calendar and Date-Values
- Marcus
HI,
Please fine the Document by HIC.
you can create flags on Master Calendar...
MTD-PMTD
inmonth(today(),Date,0)*-1 as MTD_FLAG,
InMonthToDate(Date,$(vDateToday),-1,4)*-1 as LMTD_FLAG
YTD-PYTD
if(if(Month(date(Floor(Date)))<=3,(Year(date(Floor(Date)))-1)&'-'&(Year(date(Floor(Date)))),(Year(date(Floor(Date))))&'-'&(Year(date(Floor(Date)))+1))=if(Month(((today())))<=3,(Year(((today())))-1)&'-'&(Year(((today())))),(Year(((today()))))&'-'&(Year(((today())))+1)),1,0) as YTD_Flag,
inyeartodate(Date, $(vDateToday), -1,4)* -1 AS LastYTDFlag
WTD-PWTD
InWeek(today(),Date,0)*-1 as WTD_FLAG,
InWeek(Date,$(vDateToday),-1)*-1 as LWTD_FLAG
Hope it helps you!!!
Regards,
Kavita
hi kavita, what is vDateToday in your case?
sorry I frgt to mention that..
It is a variable created on Master Calendar
let vDateToday = num(today());
Hi Kavita,
U write this code using today(), in that case its working perfectly i want, but only for current and last month i have, i want if i select any year and Month, than selected year and their month shud be thier MTD and LMTD (their previous month).