Forum Discussion
nanma94
Helper III
6 years agoOpportunity stage duration
I have an opportunity header table, that stores the latest stage, and I will ultimately want to analyze opportunity cycle time (duration per stage) by owner, territory. OpportunityId StageNa...
- 6 years ago
nanma94 try measure below and here is the result.
Days between Stages = VAR __oppyId = SELECTEDVALUE ( Oppy[OpportunityId] ) VAR __Stage = MAX ( 'Oppy Detail'[Stage #] ) VAR __StageDate = MAX ( 'Oppy Detail'[CreatedDate] ) VAR __prevStage = MAX ( __Stage - 1, 1 ) VAR __prevStageDate = CALCULATE ( MAX ( 'Oppy Detail'[CreatedDate] ), ALL ( 'Oppy Detail' ), Oppy[OpportunityId] = __OppyId, 'Oppy Detail'[Stage #] = __prevStage ) RETURN DATEDIFF( __prevStageDate, __StageDate, DAY )Would appreciate Kudos 🙂 if my solution helped.
Ashish_Mathur
Super User
6 years agoHi,
Please show the exact result that you are expecting in a simple table.