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
romovaro
Responsive Resident
Responsive Resident

Create graph with average time between 2 tasks

HI

 

I need to create a graph showing CID with average time (Using the date in TAsk Completed Date) between 

task = Greenlight Checks (and task_status Closed)

&

task = IPM handoff (and task_status Closed)

 

The filter I need to use is that the Task = Pre engagement process had to be closed by the Pre Engagement Team.

 

The table look like this one below:

 

CIDINSTANCE_NUMBERTASKTASK_ASSIGNED_ONTASK_STATUSTASK_COMPLETED_DATETASKACTUALPERFORMER
10005221233917IPM HandOff18-FEB-22 Closed18-FEB-22 Will Smith
10005841234576IPM HandOff18-FEB-22 Closed18-FEB-22 Max Planck
10007811272914Greenlight Checks16-FEB-22 Closed18-FEB-22 Maahi Olenik
10007621271607Greenlight Checks15-FEB-22 Closed16-FEB-22 Nilesh Max
10005421231151IPM HandOff11-FEB-22 Closed11-FEB-22 Will Smith
10006621267552Greenlight Checks11-FEB-22 Closed11-FEB-22 Max Planck
10005011216751IPM HandOff09-FEB-22 Closed18-FEB-22 Maahi Olenik
10007221264204IPM HandOff08-FEB-22 Closed08-FEB-22 Nilesh Max
10007221264204Pre Engagement Process08-FEB-22 Closed08-FEB-22 Will Smith
10007221264204Greenlight Checks07-FEB-22 Closed08-FEB-22 Max Planck
10007211264253Greenlight Checks07-FEB-22 Closed08-FEB-22 Maahi Olenik
10006041263733Greenlight Checks07-FEB-22 Closed20-FEB-22 Nilesh Max
10006051261846Greenlight Checks04-FEB-22 Closed07-FEB-22 Will Smith
10002041153243IPM HandOff04-FEB-22 Closed04-FEB-22 Max Planck
10007021261811Pre Engagement Process04-FEB-22 Closed18-FEB-22 Maahi Olenik

 

I don't know how to create the formula to get that and combined the formula with the task completed month and get the average days. ANy help?

 

I started with the formula below....

 

GreenLights-IpmHandoff =
VAR MeetsFirstRequirement =
CALCULATE (
COUNT ( 'BPMS LOF Report'[CID] ),
FILTER (
'BPMS LOF Report',
'BPMS LOF Report'[TASK] = "Pre engagement Process"
&& 'BPMS LOF Report'[TASK_STATUS] = "Closed" )
&& 'BPMS LOF Report'[TASKACTUALPERFORMER] = "John Smith"
|| 'BPMS LOF Report'[TASKACTUALPERFORMER] = "Max Planck"
|| 'BPMS LOF Report'[TASKACTUALPERFORMER] = "Will SMith"
)
VAR MeetsBothRequirements =
CALCULATETABLE(
VALUES( 'BPMS LOF Report'[CID] ),
MeetsFirstRequirement,
'BPMS LOF Report'[TASK_STATUS] = "Closed",
'BPMS LOF Report'[TASK]
IN { "Greenlights Checks", "IPM HandOff" }
)
RETURN MeetsBothRequirements

 

 

Thanks,

1 REPLY 1
amitchandak
Super User
Super User

@romovaro ,

you can join close date with date table and can use slicer and time intelligence for current month

for Avg day

 

Avg days = average(Table, datediff(Table[Start date], Table[End Date], day) )

 

MTD  = calculate([Avg Days], datesmtd('Date'[Date])

 

Power BI — Month on Month with or Without Time Intelligence
https://medium.com/@amitchandak.1978/power-bi-mtd-questions-time-intelligence-3-5-64b0b4a4090e
https://www.youtube.com/watch?v=6LUBbvcxtKA

 

Time Intelligence, DATESMTD, DATESQTD, DATESYTD, Week On Week, Week Till Date, Custom Period on Period,
Custom Period till date: https://youtu.be/aU2aKbnHuWs

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

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.