Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Count Tasks Next 30 Days

Hello,

 

I'm trying to count the tasks which are due in the next 30 days (from today). Is the below the correct measure?

 

Tasks Approaching = CALCULATE([OpenTasks] , (Date[c.DueMonth] >= TODAY() + 30))
 
Thanks, 
  • pls try this

    Tasks Approaching = 
    VAR _StartDate =TODAY()
    VAR _EndDate = _StartDate +30
    RETURN
    
    CALCULATE([OpenTasks] , DATESBETWEEN(Date[c.DueMonth], _StartDate,_EndDate ))

7 Replies

  • pls try this

    Tasks Approaching = 
    VAR _StartDate =TODAY()
    VAR _EndDate = _StartDate +30
    RETURN
    
    CALCULATE([OpenTasks] , DATESBETWEEN(Date[c.DueMonth], _StartDate,_EndDate ))
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thank you so much Ahmedx this has worked!

       

      How could I count the open tasks which are "in date" also? So, not yet due? 

      • Ahmedx's avatar
        Ahmedx
        Super User

        did not understand, explain in more detail what you want and by what principle the task is considered open?

  • Anonymous , Need the correct table name, also need to know how openTaks works

     

    Tasks Approaching = CALCULATE([OpenTasks] , Filter(Date, Date[DueMonth] >= TODAY() + 30))
     
    if open task measure is snapshot measure, refer
    Average of Rolling, Average of Snapshots: https://youtu.be/_pZRdLAJxxA
    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello amitchandak  thank you for the reply, I get the following error -