Forum Discussion
Ejykso
Helper I
3 years agoCustom Date Period
Hi All, I have a problem with my custom date period. I'm using this: var _today = today() Return union ( addcolumns ( calendar(date(year(_today), month (_today), 1), _today) ,"type", "m...
FreemanZ
Super User
3 years agohi Ejykso
try like:
Table =
var _today = today()
VAR _quarterstart =
DATE(
YEAR(_today),
(QUARTER(_today)-1)*3+1,
1
)
Return
union (
addcolumns (
calendar(date(year(_today), month (_today), 1), _today),
"type", "mtd",
"order", 1
),
addcolumns(
CALENDAR(_quarterstart, _today),
"type", "qtd",
"order", 2
)
)
it worked like:
it would be easier with Time Intelligence Functions.