Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Duplicate Dates Using DATESBETWEEN

Hi, I have a database of work orders and I'm trying to pull a count of those which have a Complete by Date in the next 7 days and are in the status CRE or CIP. Here is my DAX: YELLOW1 = calculate(...
  • amitchandak's avatar
    4 years ago

    Anonymous , You should always use Date/Calendar table marked as Date table

     

    example

    Rolling 7 = CALCULATE(count(wkaw[Work Order]),DATESINPERIOD('Date'[Date ],MAX('Date'[Date ]),7,day))

     

    or

     

    Rolling 7 = CALCULATE(count(wkaw[Work Order]),DATESINPERIOD('Date'[Date ],today() ,7,day))

     

     

    Rolling Days Formula: https://youtu.be/cJVj5nhkKBw