# Report for combined teams sprint velocity

I have 2 teams with shared resources so our velocity fluctuates between sprints. I’m looking for a way to combine both teams velocity. Our sprints are named “Team X Sprint 60” and Team 123 Sprint 60"
Is there a way I can calculate both teams velocity together for the last and show the last 6 sprints?

1 Like

Hi @dbosserman,

Yes, you can combine sprint velocity for both teams. I understand that team information is encoded in a sprint name.

1. In Sprint dimension, define a new calculated member that groups all closed sprints for team X and team 123. The conclusion is similar to “All closed sprints” with additional filter criteria, that sprint name starts with “Team X” or “Team 123”.

``````Aggregate(
Order(
Filter([Sprint].[Sprint].Members,
[Sprint].CurrentMember.getBoolean('Closed') AND
NOT IsEmpty([Sprint].CurrentMember.get('Complete date')) AND
[Sprint].CurrentMember.Name MATCHES "Team X.*|Team 123.*"
),
[Sprint].CurrentMember.get('Start date'),
BASC
)
)
``````

I will name this calculated member “Team X and 123 All closed sprints” for further reference in the calculations.

2. In the Measures section, define a new calculated measure to get running velocity for Team X and Team 123. The formula is similar to measure “Running Story Points velocity for 5 closed sprints” with few modifications, use new calculated member “Team X and 123 All closed sprints” instead of “All closed sprints” and change the count of sprints to 6 instead of 5.

``````CASE
WHEN
[Sprint].CurrentMember is [Sprint].DefaultMember
OR
-- for closed sprints only
[Sprint].CurrentMember.getBoolean('Closed') AND
NOT IsEmpty([Sprint].CurrentMember.get('Complete date')) AND
[Measures].[Sprint Story Points committed] > 0
THEN
AVG(
Tail(
-- filter last 5 closed sprints starting from current sprint
Filter(
Cache(ChildrenSet([Sprint].[Team X and 123 all closed sprints])),
Rank([Sprint].CurrentMember,
Cache(ChildrenSet([Sprint].[Team X and 123 all closed sprints]))
)
),
-- only sprints with committed story points are retrieved
[Measures].[Sprint Story Points committed] > 0
), 6
),
[Measures].[Sprint Story Points completed]
)
END
``````

Best,
Zane / support@eazyBI.com