Forum Discussion
DATEADD in calculated table cannot use column
- Anonymous7 years ago
Functions that work with dates need input that is a DATE (and even though sometimes type coercion kicks in, you should NEVER rely on that), so please make sure you have the right input into your functions. What's more, some of them need input in the form of a column with specific data types, some work on pure dates (disconnected from any tables). For the correct syntax and data types, please refer to DAX Guide. You'll find everything you need in there.
By the way...
var __today = TODAY() var __todayBackInTime = EDATE( __today, -12 ) return { __todayBackInTime }Best
Darek
Functions that work with dates need input that is a DATE (and even though sometimes type coercion kicks in, you should NEVER rely on that), so please make sure you have the right input into your functions. What's more, some of them need input in the form of a column with specific data types, some work on pure dates (disconnected from any tables). For the correct syntax and data types, please refer to DAX Guide. You'll find everything you need in there.
By the way...
var __today = TODAY()
var __todayBackInTime = EDATE( __today, -12 )
return
{ __todayBackInTime }
Best
Darek