Forum Discussion
Calculate metrics on day-by-day Azure DevOps board export
Hello,
I am struggling with the following and could use some help
Situation:
I have an export from Azure DevOps with the day-by-day status of PBIs since creation until day of completion. I am trying to get insight into the following:
1. PBIs that are overdue (Target Date > Completed Date or 2024-05-31 if not completed), filterable to area or period
2. Lead Time and Cycle time, to also be able to calculate averages, top 25%
3. PBIs that have gone backwards in status (e.g. from Completed to In Progress)
Issues:
[1] With calculated columns returning 0 or 1 if conditions are met, each row gets a 1 so a matrix table shows 5 for an overdue item with 5 rows of data. My countrows measure did the same. I guess it can be solved with Max, distinct, or an is current column?
[2] I get the right value in a table per PBI with show max setting, but doesn't work as intended with a table per area.
[3] I have no clue how to write a measure for it. There are only 3 possible statusses so it would need to check the order of a status of a row against those with earlier dates, conditioned that it's all the same PBI.
--
My Trial Table. Last 6 columns to be made into measure/calc column. Below expected result
| Area | Work item ID | State | State Category | Created Date | Closed Date | Target Date | Date | Is Current | Lead Time | Cycle Time | Overdue | Overdue_Days | Backwards |
| A | 1 | New | Proposed | 1-1-2024 | 4-1-2024 | 3-1-2024 | 1-1-2024 | FALSE | |||||
| A | 1 | Committed | In Progress | 1-1-2024 | 4-1-2024 | 3-1-2024 | 2-1-2024 | FALSE | |||||
| A | 1 | Committed | In Progress | 1-1-2024 | 4-1-2024 | 3-1-2024 | 3-1-2024 | FALSE | |||||
| A | 1 | Done | Completed | 1-1-2024 | 4-1-2024 | 3-1-2024 | 4-1-2024 | TRUE | 4 | 3 | 1 | 1 | 0 |
| A | 2 | New | Proposed | 1-1-2024 | 4-1-2024 | 1-1-2024 | FALSE | ||||||
| A | 2 | Committed | In Progress | 1-1-2024 | 4-1-2024 | 2-1-2024 | FALSE | ||||||
| A | 2 | Done | Completed | 1-1-2024 | 4-1-2024 | 3-1-2024 | TRUE | 3 | 2 | 0 | 0 | ||
| A | 3 | New | Proposed | 1-1-2024 | 2-1-2024 | 1-1-2024 | FALSE | ||||||
| A | 3 | Committed | In Progress | 1-1-2024 | 2-1-2024 | 2-1-2024 | FALSE | ||||||
| A | 3 | Committed | In Progress | 1-1-2024 | 2-1-2024 | 3-1-2024 | FALSE | ||||||
| A | 3 | Committed | In Progress | 1-1-2024 | 2-1-2024 | 4-1-2024 | TRUE | 4 | 3 | 1 | 2 | 0 | |
| A | 4 | New | Proposed | 1-1-2024 | 1-1-2024 | FALSE | |||||||
| A | 4 | Done | Completed | 1-1-2024 | 2-1-2024 | 5-1-2024 | 2-1-2024 | TRUE | 2 | 1 | 0 | 0 | |
| B | 5 | New | Proposed | 1-1-2024 | 1-1-2024 | FALSE | |||||||
| B | 5 | New | Proposed | 1-1-2024 | 2-1-2024 | FALSE | |||||||
| B | 5 | Committed | In Progress | 1-1-2024 | 3-1-2024 | FALSE | |||||||
| B | 5 | Done | Completed | 1-1-2024 | 4-1-2024 | 2-1-2024 | 4-1-2024 | TRUE | 4 | 2 | 1 | 2 | 0 |
| B | 6 | Committed | In Progress | 1-1-2024 | 1-1-2024 | FALSE | |||||||
| B | 6 | New | Proposed | 1-1-2024 | 2-1-2024 | FALSE | |||||||
| B | 6 | New | Proposed | 1-1-2024 | 3-1-2024 | TRUE | 3 | 1 | 0 | 1 | |||
| B | 7 | Done | Completed | 1-1-2024 | 1-1-2024 | 2-1-2024 | 1-1-2024 | FALSE | |||||
| B | 7 | Committed | In Progress | 1-1-2024 | 1-1-2024 | 2-1-2024 | 2-1-2024 | FALSE | |||||
| B | 7 | Committed | In Progress | 1-1-2024 | 1-1-2024 | 2-1-2024 | 3-1-2024 | TRUE | 3 | 1 | 0 | 1 | |
| B | 8 | New | Proposed | 1-1-2024 | 7-1-2024 | 10-1-2024 | 1-1-2024 | FALSE | |||||
| B | 8 | Committed | In Progress | 1-1-2024 | 7-1-2024 | 10-1-2024 | 2-1-2024 | FALSE | |||||
| B | 8 | Committed | In Progress | 1-1-2024 | 7-1-2024 | 10-1-2024 | 3-1-2024 | FALSE | |||||
| B | 8 | Committed | In Progress | 1-1-2024 | 7-1-2024 | 10-1-2024 | 4-1-2024 | FALSE | |||||
| B | 8 | Committed | In Progress | 1-1-2024 | 7-1-2024 | 10-1-2024 | 5-1-2024 | FALSE | |||||
| B | 8 | Committed | In Progress | 1-1-2024 | 7-1-2024 | 10-1-2024 | 6-1-2024 | FALSE | |||||
| B | 8 | Done | Completed | 1-1-2024 | 7-1-2024 | 10-1-2024 | 7-1-2024 | TRUE | 7 | 6 | 0 | 0 |
Expected result:
| Area | # Overdue | Avg Overdue | Avg Lead Time | Avg Cycle Time | # Backwards |
| A | 2 | 1,5 | 3,25 | 2,25 | 0 |
| B | 1 | 2 | 4,25 | 2,5 | 2 |
- Anonymous2 years ago
Hi PJVisscher89 ,
Thanks for lbendlin reply.
Here some steps that I want to share, you can check them if they suitable for your requirement.
Create two calculated column:Overdue = VAR _completedDate = CALCULATE( MAX('Table'[Date]), ALLEXCEPT( 'Table', 'Table'[Work item ID] ) ) VAR _targetDate = CALCULATE( MAX('Table'[Target Date]), ALLEXCEPT( 'Table', 'Table'[Work item ID] ) ) VAR _date = IF( _targetDate = BLANK(), DATE(2024,5,31), _targetDate ) RETURN IF( _completedDate > _date && _completedDate = 'Table'[Date].[Date], 1, BLANK() )Overdue_Days = VAR _completedDate = CALCULATE( MAX('Table'[Date]), ALLEXCEPT( 'Table', 'Table'[Work item ID] ) ) VAR _targetDate = CALCULATE( MAX('Table'[Target Date]), ALLEXCEPT( 'Table', 'Table'[Work item ID] ) ) RETURN IF( 'Table'[Overdue] = 1, DATEDIFF(_targetDate,_completedDate,DAY), BLANK() )Using Aggregation on Columns on Views
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
3 Replies
- AnonymousNot applicable
Hi PJVisscher89 ,
Thanks for lbendlin reply.
Here some steps that I want to share, you can check them if they suitable for your requirement.
Create two calculated column:Overdue = VAR _completedDate = CALCULATE( MAX('Table'[Date]), ALLEXCEPT( 'Table', 'Table'[Work item ID] ) ) VAR _targetDate = CALCULATE( MAX('Table'[Target Date]), ALLEXCEPT( 'Table', 'Table'[Work item ID] ) ) VAR _date = IF( _targetDate = BLANK(), DATE(2024,5,31), _targetDate ) RETURN IF( _completedDate > _date && _completedDate = 'Table'[Date].[Date], 1, BLANK() )Overdue_Days = VAR _completedDate = CALCULATE( MAX('Table'[Date]), ALLEXCEPT( 'Table', 'Table'[Work item ID] ) ) VAR _targetDate = CALCULATE( MAX('Table'[Target Date]), ALLEXCEPT( 'Table', 'Table'[Work item ID] ) ) RETURN IF( 'Table'[Overdue] = 1, DATEDIFF(_targetDate,_completedDate,DAY), BLANK() )Using Aggregation on Columns on Views
Best regards,
Albert HeIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly
- PJVisscher89Frequent Visitor
That's very helpful yes, thanks!
- lbendlin
Super User
Your expected result doesn't seem to correlate to your sample data.
Please provide the sample data as it comes from Azure DevOps, and indicate the expected result based on that sample data.