The documentation here: https://msdn.microsoft.com/en-us/library/mt674921.aspx Says that DATE(2009,1,1) is a valid value, but this returns an error. VAR Holidays = DATATABLE("Date",DATETI...
v-qiuyu-msft
Community Support
8 years agoHi Greg_Deckler,
Please see below information:
This is a documentation bug. DATATABLE function only supports constant literals but not any other functions, even those which return a constant value. Please use the DAX table constructor syntax (https://msdn.microsoft.com/en-us/library/mt842623.aspx) instead:
{DATE(2009,4,15)+TIME(2,45,21)}
and
{DATE(2017,12,25)}
Since the table constructor syntax doesn't give user the ability to pick column names, the user can change column names afterwards or use DAX SELECTCOLUMNS function to rename the default column names to desired ones.
We'll fix the online document for DATATABLE.
Best Regards,
Qiuyun Yu