Forum Discussion
prasadhebbar315
Advocate I
3 years agoDays between case closed to case reopen for the same device
Hello everyone, I am working on a problem where I need to identify days between Case Closed and Case Reopen for the same device. This is a problem in contact center where an agent creates a service ...
- Anonymous3 years ago
Hi prasadhebbar315 ,
Here are the steps you can follow:
1. Create calculated column.
Days_to_Close = DATEDIFF( 'Table'[Service_Open_Date],'Table'[Service_Closed_Date],DAY)+1Reopen_Days = var _LastOpen= MAXX( FILTER(ALL('Table'), 'Table'[Device_Number]=EARLIER('Table'[Device_Number])&&'Table'[Service_Open_Date]<EARLIER('Table'[Service_Open_Date])),[Service_Open_Date]) var _LastClose= MAXX( FILTER(ALL('Table'),'Table'[Service_Open_Date]=_LastOpen),'Table'[Service_Closed_Date]) return DATEDIFF( _LastClose,'Table'[Service_Open_Date],DAY)2. Result:
Best Regards,
Liu Yang
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 prasadhebbar315 ,
Here are the steps you can follow:
1. Create calculated column.
Days_to_Close =
DATEDIFF(
'Table'[Service_Open_Date],'Table'[Service_Closed_Date],DAY)+1Reopen_Days =
var _LastOpen=
MAXX(
FILTER(ALL('Table'),
'Table'[Device_Number]=EARLIER('Table'[Device_Number])&&'Table'[Service_Open_Date]<EARLIER('Table'[Service_Open_Date])),[Service_Open_Date])
var _LastClose=
MAXX(
FILTER(ALL('Table'),'Table'[Service_Open_Date]=_LastOpen),'Table'[Service_Closed_Date])
return
DATEDIFF(
_LastClose,'Table'[Service_Open_Date],DAY)
2. Result:
Best Regards,
Liu Yang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- prasadhebbar3153 years ago
Advocate I
Anonymous Thanks for the solution.