Forum Discussion
Find the minimum value within grouped data
- 9 years ago
I don't think I have this 100% right but we might be close.
This returns a table of incidents showing the duration between the first datetime of the incident and the duration of each step in minutes for each step for each subsequent step.
Table = VAR T1 = SUMMARIZE( FILTER( 'Incidents', LEFT([ActionDescription],20)="Incident assigned to" ), Incidents[IncidentNo], "First Assigned",MIN('Incidents'[ActionDateTime]) ) RETURN ADDCOLUMNS( NATURALINNERJOIN('Incidents',T1), "Duration",IFERROR(DATEDIFF([First Assigned],'Incidents'[ActionDateTime],MINUTE) ,0)
)
I don't think I have this 100% right but we might be close.
This returns a table of incidents showing the duration between the first datetime of the incident and the duration of each step in minutes for each step for each subsequent step.
Table =
VAR T1 = SUMMARIZE(
FILTER(
'Incidents',
LEFT([ActionDescription],20)="Incident assigned to"
),
Incidents[IncidentNo],
"First Assigned",MIN('Incidents'[ActionDateTime])
)
RETURN ADDCOLUMNS(
NATURALINNERJOIN('Incidents',T1),
"Duration",IFERROR(DATEDIFF([First Assigned],'Incidents'[ActionDateTime],MINUTE) ,0)
)OK, its getting there.... Need to understand all this so breaking it down. I did the following to see what I would get in the table and error check.. but getting a column with #Error...
- jmarlatt9 years agoNew Member
Ha, it was a calculated column that got left in there that I was playing with earlier! the code does not generate any error. Once I validate results, adding the rest of the code to get the time difference... thank you!!!!
- Phil_Seamark9 years agoMicrosoft Employee
Nice work.
I can add a Ranking column to the table too if you want and index of the incident actions per incident
- jmarlatt9 years agoNew Member
That sounds intresting! It would be great to see that! Also In additon to the text "Incident assigned to:" the actiondescription could also read "Incident acknowledged" which ever would come first is the time stamp i need to use.
- Phil_Seamark9 years agoMicrosoft Employee
What does the error say when you hover over it?