Forum Discussion

jblackshear's avatar
jblackshear
Advocate III
9 years ago
Solved

Problem with date construction using DATE function

I have a need for year-to-date and previous year-to-date figures that always use the current date (actually, the maximum posting date available in the data warehouse, which is usually the previous bu...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Hi jblackshear,

     

    >>Measures using a date that was created by programmatic manipulation of a real date cause an error, an error specifically referring to an invalid DATE value, when used in a chart (but no syntax errors in creating the measure).

    "Date" function not available on mutiple date, power bi will show you the date function error "date too small or too large". So date function only works on single date calculate, if you want to filter on mutiple date, you can try to use SAMEPERIODLASTYEAR, DATEADD functions. (dateadd also works on your formula)

     

    Regards,

    Xiaoxin Sheng