katoma's avatar
katoma
Regular Visitor
8 years ago
Status:
Needs Info

BUG: DATESINPERIOD Function not accepting Enum Interval anymore

Function  definiton:

 https://msdn.microsoft.com/query-bi/dax/datesinperiod-function-dax

Problem:

 Can't save/apply/change measure anymore due to not accepting any interval parameter

Measure:

 avg something = CALCULATE(AVERAGE('Table'[something]),
  DATESINPERIOD('Table'[Date],TODAY(), -7, DAY))

Version:

 Version: 2.57.5068.721 64-bit (April 2018)

Solution/Fix:

  avg something = CALCULATE(AVERAGE('Table'[something]),
  DATESINPERIOD('Table'[Date],TODAY(), -7,0 , DAY))

 

Function is defined with integer and not number. Parser seems to be broken

4 Comments

  • katoma's avatar
    katoma
    Regular Visitor

    v-jiascu-msft did you try the excact version? this popped up like a month ago. i can share pbit but where to, to whom?

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi katoma,

     

    Yes, I tried with the exact version. You can upload the file to a cloud drive like OneDrive, Dropbox. Then send me a message of the download link.

     

    Best Regards,

    Dale