Forum Discussion
nmeliasp
7 years agoRegular Visitor
datediff calculating milestone completion cycle time
Hello i have the following data and trying to calculate date difference in days between 2 different milestone completions Identifer Milestone Completion Completion date A X 1/1/2018 ...
- 7 years ago
Hi nmeliasp
You may use ALLEXCEPT Function as below:
Measure = VAR MAX_Date = CALCULATE ( MAX ( Table1[Completion date] ), ALLEXCEPT(Table1,Table1[Identifer]) ) VAR MIN_Date = CALCULATE ( MIN( Table1[Completion date] ), ALLEXCEPT(Table1,Table1[Identifer]) ) RETURN DATEDIFF ( MIN_Date,MAX_Date, DAY )Regards,
Cherie
v-cherch-msft
7 years agoMicrosoft Employee
Hi nmeliasp
You may use ALLEXCEPT Function as below:
Measure =
VAR MAX_Date =
CALCULATE (
MAX ( Table1[Completion date] ),
ALLEXCEPT(Table1,Table1[Identifer])
)
VAR MIN_Date =
CALCULATE (
MIN( Table1[Completion date] ),
ALLEXCEPT(Table1,Table1[Identifer])
)
RETURN
DATEDIFF ( MIN_Date,MAX_Date, DAY )
Regards,
Cherie
nmeliasp
7 years agoRegular Visitor
Awesome that worked!!!