Forum Discussion
Anonymous
3 years agoNot applicable
Date Difference with Filters
Project No. Tasks in the Projects Start Date End Date AB10001 XXYYZZ12 8/24/2022 9/5/2022 AB10001 XXYYZZ13 8/25/2022 9/6/2022 AB10001 XXYYZZ14 8/...
- 3 years ago
Hi Anonymous ,
You just need one measure for all of your requirements:
_projectLeadTime = AVERAGEX( SUMMARIZE( yourTable, yourTable[Project No.], "minStart", MIN(yourTable[Start Date]), "maxEnd", MAX(yourTable[End Date]) ), DATEDIFF([minStart], [maxEnd], DAY) )Here's the output when applied against different levels of dimensions:
Pete
v-yalanwu-msft
3 years agoCommunity Support
Hi, Anonymous ;
You could create a measure by dax.
Measure = DIVIDE(
SUMX(SELECTCOLUMNS('Table',"Project",[Project Nd],"1",
CALCULATE(DATEDIFF(MIN('Table'[Start Date ]), MAX('Table'[End Date]),DAY),ALLEXCEPT('Table','Table'[Project Nd]))),[1]),
COUNTROWS('Table'))
The final show:
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.