Forum Discussion

SureshA's avatar
SureshA
Icon for Helper II rankHelper II
1 year ago
Solved

Velocity chart similar to Azure Devops

I am trying to build a velocity chart similar to Azure Devops to depict for each sprint

1. Planned

2. Completed 

3. Removed

 

I have used ado analytic views with history 

I am unable to get the planned story points in powerbi to match with the velocity chart of ado

Ado calculate differently for the planned story points based on snapshot view. How to replicate the planned story points 

 

Completed and removed are straight forward based on work item state at the end of spirint

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi SureshA ,
    we get that you cant share the official data but it is working as expected with our sample data. could you please explain more on mismatch so we can try changing Dax,find the attached file for your reference.

    Regards,
    Harshitha.
     

     

32 Replies

  • Hi SureshA ,

     

    To replicate the Azure DevOps velocity chart in Power BI, particularly the "Planned" story points, you must align with the platform's snapshot-based calculation. "Planned" work in Azure DevOps represents all work items assigned to a sprint before its official start date. To capture this, connect Power BI to an Azure DevOps Analytics view configured with daily historical granularity. This provides a daily snapshot of work item states, which is essential for accurate historical reporting.

    For calculating completed work, you can sum the effort for items in a terminal state at the end of the sprint.

    Completed Story Points = 
    CALCULATE(
        SUM('YourTableName'[Story Points]),
        'YourTableName'[State] IN {"Done", "Closed"}
    )

    Removed work includes items that were part of the sprint at some point but were moved to a different iteration before the sprint ended. Accurately tracking this often involves analyzing changes to the Iteration Path field over the sprint's duration.

    The crucial part is calculating the "Planned" story points, which requires querying the historical data for the state of the backlog on the sprint's start date. Assuming you have a WorkItemBoardSnapshot table from your Analytics View and a related 'Sprints' table with start dates, the DAX measure would isolate the work items assigned to the specific sprint on that initial day.

    Planned Story Points =
    VAR CurrentSprintStartDate = MIN('Sprints'[Start Date])
    VAR CurrentSprintPath = SELECTEDVALUE('Sprints'[Iteration Path])
    RETURN
    CALCULATE(
        SUM('WorkItemBoardSnapshot'[Story Points]),
        FILTER(
            ALL('WorkItemBoardSnapshot'),
            'WorkItemBoardSnapshot'[Date] = CurrentSprintStartDate &&
            'WorkItemBoardSnapshot'[Iteration Path] = CurrentSprintPath
        )
    )

    This approach ensures your Power BI report mirrors the Azure DevOps methodology by summing the story points of work items that were planned for the sprint at the moment it began, providing an accurate baseline for your velocity calculation. These measures can then be used in a stacked column chart with the sprint on the axis to visualize the planned, completed, and removed work over time.

     

    Best regards,

    • SureshA's avatar
      SureshA
      Icon for Helper II rankHelper II

      Thanks 

      I have the following fields with all history from ado analytics view filtered for my required squads

      1. Work item type

      2. Iteration path

      3. Interation start date

      4.. Iteration end date

      5. Created date

      6. Changed Date

      7. Story points

       

      In your dax measure for planned story points, you have referred 

      <<WorkItemBoardSnapshot table from your Analytics View and a related 'Sprints' table with start dates>>

      • I have only one table which has history along with the above listed fields containing sprint start date i.e iteration start datehow do I use this in the Dax
      • secondly ado also considers story points that got planned during sprint progress. How do I sum up these with the created and change date
      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi SureshA,
        Thank you for your followup.

        It shows how to load your data, create DAX measures using your existing columns like Iteration Start Date, Changed Date, Created Date, and State, and finally build a stacked column chart.

        I tested it with my sample data, and it worked fine. Please find the attached screenshot and Pbix for your reference.

        If I misunderstand your needs or you still have problems on it, please feel free to let us know.  

        If the response has addressed your query, please Accept it as a solution and give a 'Kudos' so other members can easily find it

        Best Regards,
        Harshitha.




  • SureshAnanth's avatar
    SureshAnanth
    Frequent Visitor

    Anonymous i have tried the dax it doesnt match with ADO velocity chart

      • SureshA's avatar
        SureshA
        Icon for Helper II rankHelper II

        Anonymous I m unable to get any data from official network. Kindly try out the dax and verify its output against existing ado velocity chart of your squad 

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hi SureshA ,
      we get that you cant share the official data but it is working as expected with our sample data. could you please explain more on mismatch so we can try changing Dax,find the attached file for your reference.

      Regards,
      Harshitha.
       

       

      • SureshA's avatar
        SureshA
        Icon for Helper II rankHelper II

        Anonymous thanks unfortunately I can't open the pbix file in my office environments. Can you please share the dax

  • SureshA Hey,
    Try below steps as per my understanding -  

    Use the current or final state at sprint end.

    Completed = sum of story points for items in Done/Completed state at sprint end.

    Removed = sum of story points for items moved to Removed/Removed state by sprint end.

     

     

    PlannedPoints =
    CALCULATE(
    SUM(SnapshotTable[StoryPoints]),
    SnapshotTable[Iteration] = SelectedSprint,
    SnapshotTable[SnapshotDate] = SprintStartDate
    )

     

    Thanks

    Harish KM

    Please accept this as a solution if this solves your problem and give kudos as well.