Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

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, 
1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

pls try this

Tasks Approaching = 
VAR _StartDate =TODAY()
VAR _EndDate = _StartDate +30
RETURN

CALCULATE([OpenTasks] , DATESBETWEEN(Date[c.DueMonth], _StartDate,_EndDate ))

View solution in original post

7 REPLIES 7
Ahmedx
Super User
Super User

pls try this

Tasks Approaching = 
VAR _StartDate =TODAY()
VAR _EndDate = _StartDate +30
RETURN

CALCULATE([OpenTasks] , DATESBETWEEN(Date[c.DueMonth], _StartDate,_EndDate ))
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? 

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

Anonymous
Not applicable

Sorry @Ahmedx , I wish to count the open tasks which are not yet due (Due Date is over 30 days in front)

 

So ideally I'm looking for 3x measures in total, In Date, Approaching and Overdue.  

 

Would the below be correct for In Date?

In Date = CALCULATE([m.OpenTasks], (modHelpdeskWithHistoryV3[c.DueMonth] <= TODAY()))

this will give you tasks that are overdue

amitchandak
Super User
Super User

@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
Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

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

 

Bidds10_0-1691485533165.png

 

 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.