Forum Discussion
rmcclung
3 years agoFrequent Visitor
Please help - Calculate difference in dates categorized by a job schedule number
Hey Everyone, I'm struggling on this one. My data is pulling in from an Excel sheet (attached) and I need to perform a calculation that pulls the difference (in days) between column C [Date Start...
- Anonymous3 years ago
Hi rmcclung
You can refer to the following calculated column.
Result = VAR a = CALCULATE ( MIN ( 'Table'[Date Started] ), FILTER ( 'Table', 'Table'[ob Schedule (Stamped)] = EARLIER ( 'Table'[ob Schedule (Stamped)] ) ) ) RETURN IF ( 'Table'[Date Started] = a, IF ( DATEDIFF ( 'Table'[Date Started], 'Table'[Date Completed], DAY ) < 30, DATEDIFF ( 'Table'[Date Started], 'Table'[Date Completed], DAY ), BLANK () ) )Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
3 years agoNot applicable
Hi rmcclung
You can refer to the following calculated column.
Result =
VAR a =
CALCULATE (
MIN ( 'Table'[Date Started] ),
FILTER (
'Table',
'Table'[ob Schedule (Stamped)] = EARLIER ( 'Table'[ob Schedule (Stamped)] )
)
)
RETURN
IF (
'Table'[Date Started] = a,
IF (
DATEDIFF ( 'Table'[Date Started], 'Table'[Date Completed], DAY ) < 30,
DATEDIFF ( 'Table'[Date Started], 'Table'[Date Completed], DAY ),
BLANK ()
)
)
Output
Best Regards!
Yolo Zhu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
rmcclung
3 years agoFrequent Visitor
This worked perfectly. Thank you so much! I'll mark this as "Accept as Solution"