Skip to content

Tree of Work Items

Stanislaw Swierc edited this page Mar 13, 2017 · 5 revisions

Tree queries can be used to import complete hierarchy tree of work items. Working with hierarchies in Power BI requires special modelling pattern. Power Bi file produced by the extension already implements these pattern for you so that you can create roll-up style reports right after you load the data.

The pattern consists of a Hierarchy Path column created with DAX PATH function...

Hierarchy Path = PATH('Work Items'[ID], 'Work Items'[Parent ID])

and a set of Hierarchy Level columns from 1 to 5. If you need you can add more levels manually.

Hierarchy Level 1 = LOOKUPVALUE([Title], [ID], PATHITEM([Hierarchy Path], 1, INTEGER))

Once level columns are defined they can be turned into hierarchy and used in reports such as the example report included in the Power BI file. You can learn more about visualizing hierarchical data from the Power BI sites referenced in Resources.

Walkthrough

Resources

Clone this wiki locally