Forum Discussion
Create and populate a Calculated Column with MAX value from child tickets
Hello!
I'm trying to calculate an availability % based on our unique incidents. To give that some context, when we log a major incident it could impact several areas/products within the business. It could also impact those areas/products for different durations, so to account for this and for reporting purposes, whenever we get a major incident, we log sub-tasks which reflect those different impacts. So for incident #1, that might have resulted in 10 mins downtime for Product A, but 15 mins of downtime for Product B. The ticket references do not necessarily run sequentially, as we only raise the sub-tasks once the incident is resolved (and other incidents might have been logged in the meantime), so the relationship might be incident #1 has sub-task #5 for the impact to area 1 and sub-task #8 for the impact to product B.
Our weekly and monthly reporting is done for each area/product, so we just use the downtime figures in the sub-tasks. But for quarterly reporting, which is done at a business level, we need to take the highest downtime value for each incident and use that in our availability calculation. This is currently done in a very manual way in excel.
So what I would like to do is create a calculated column and populate each incident in the table with the MAX downtime value from the sub-tasks that relate to it - something like below.
I've also included a sample pbix file of example data. The key columns are:
ISSUE_KEY - ref number for all tickets
ISSUE_PARENT_ISSUE_KEY - ref number that shows which incident a sub-task is related to
Issue_Type - incident or sub-task
Downtime - this is only populated for sub-tasks for the reasons stated above
MAX Downtime Per Incident - the calculated column I would like to create to store the MAX value in
Thanks
David
Try this calculated column:
MAX Downtime Per Incident = VAR vIssueKey = Issues[ISSUE_KEY] VAR vTable = FILTER ( Issues, Issues[ISSUE_PARENT_ISSUE_KEY] = vIssueKey ) VAR vResult = MAXX ( vTable, Issues[Downtime] ) RETURN vResult
2 Replies
- DataInsightsSuper User
Try this calculated column:
MAX Downtime Per Incident = VAR vIssueKey = Issues[ISSUE_KEY] VAR vTable = FILTER ( Issues, Issues[ISSUE_PARENT_ISSUE_KEY] = vIssueKey ) VAR vResult = MAXX ( vTable, Issues[Downtime] ) RETURN vResult - dwightman2176Frequent Visitor
Amazing, thank you DataInsights! 😀