Forum Discussion
dev85
3 years agoFrequent Visitor
Connect to a devops custom query
Hi everybody! I'm a BI developer and recently I had to build a dashboard using the boards info that are in our DevOps environment. I was able to load all the boards into power BI with no proble...
ferryv
Resolver II
3 years agoInstead of linking it to a query in Azure DevOps, could you use the oData.Feed instead in PowerQuery, e.g:
let
Source = OData.Feed ("https://analytics.dev.azure.com/{org}/{project}/_odata/v3.0-preview/WorkItems?"
&"$filter=WorkItemType eq 'Task' "
&"and State ne 'Closed' "
&"and startswith(Area/AreaPath,'{areaPath}') "
&"&$select=WorkItemId,Title,WorkItemType,State"
&"&$expand=Links( "
&"$filter=LinkTypeName eq 'Parent' "
&"and TargetWorkItem/WorkItemType eq 'Product Backlog Item'; "
&"$select=LinkTypeName; "
&"$expand=TargetWorkItem($select=WorkItemType,WorkItemId,Title,State) "
&") "
,null, [Implementation="2.0",OmitValues = ODataOmitValues.Nulls,ODataVersion = 4]),
#"Expand Links" = Table.ExpandTableColumn(Source, "Links", {"LinkTypeName", "TargetWorkItem"}, {"Link Type", "Links.TargetWorkItem"}),
#"Expand Parent Items" = Table.ExpandRecordColumn(#"Expand Links", "Links.TargetWorkItem", {"WorkItemId", "Title", "WorkItemType", "State"}, {"Parent WorkItemId", "Parent Title", "Parent WorkItemType", "Parent State"})
in
#"Expand Parent Items"
And then filter out the values where "Link Type" is null (null would mean orphaned, i.e no Parent link).
The result would look something like this: