Azure devops 从Power BI中的Azure DevOps创建跨组织Sprint燃尽图表
我在下面的查询中创建了Azure DevOps中的Sprint Burndown跨组织。它工作得又细又滑Azure devops 从Power BI中的Azure DevOps创建跨组织Sprint燃尽图表,azure-devops,powerbi,odata,Azure Devops,Powerbi,Odata,我在下面的查询中创建了Azure DevOps中的Sprint Burndown跨组织。它工作得又细又滑 OData.Feed ("https://analytics.dev.azure.com/" & organization & "/" & projectName & "/_odata/v3.0-preview/WorkItemSnapshot?" &"$apply=
OData.Feed ("https://analytics.dev.azure.com/" & organization & "/" & projectName & "/_odata/v3.0-preview/WorkItemSnapshot?"
&"$apply=filter(WorkItemType eq 'User Story' and StateCategory ne 'Completed' and DateValue ge Iteration/StartDate and DateValue le Iteration/EndDate and Iteration/StartDate ge 2020-01-01Z)"
&"/groupby( "
&"(DateValue,State,WorkItemType,Area/AreaPath,Iteration/IterationPath,Iteration/StartDate,Iteration/EndDate), "
&"aggregate($count as Count, StoryPoints with sum as TotalStoryPoints) "
&") ",
[#"Authorization" = "Basic " & apiKey]
, [Implementation="2.0",OmitValues = ODataOmitValues.Nulls,ODataVersion = 4])
然而,我也想查询每个项目下的团队,但与迭代和区域相比,这不像在groupby
部分添加Teams/TeamName
那么简单
以下是我失败的尝试:
OData.Feed ("https://analytics.dev.azure.com/" & organization & "/" & projectName & "/_odata/v3.0-preview/WorkItemSnapshot?"
&"$apply=filter(WorkItemType eq 'User Story' and StateCategory ne 'Completed' and DateValue ge Iteration/StartDate and DateValue le Iteration/EndDate and Iteration/StartDate ge 2020-01-01Z)"
&"/groupby( "
&"(DateValue,State,WorkItemType,Teams/TeamName,Area/AreaPath,Iteration/IterationPath,Iteration/StartDate,Iteration/EndDate), "
&"aggregate($count as Count, StoryPoints with sum as TotalStoryPoints) "
&") ",
[#"Authorization" = "Basic " & apiKey]
, [Implementation="2.0",OmitValues = ODataOmitValues.Nulls,ODataVersion = 4])
我发现更有效的方法是使用另一个OData端点
WorkItemBoardSnapshot
,在这里我可以执行服务器端groupby
,这比在Power BI中执行要高效得多
以下是一些参考资料:
OData.Feed ("https://analytics.dev.azure.com/" & organization & "/" & projectName &"/_odata/v3.0-preview/WorkItemBoardSnapshot?"
&"$apply=filter(WorkItemType eq 'User Story' and StateCategory ne 'Completed' and DateValue ge Iteration/StartDate and DateValue le Iteration/EndDate and Iteration/StartDate ge 2020-01-01Z)"
&"/groupby("
&"(DateValue,WorkItemType,Team/TeamName,Iteration/IterationPath,Iteration/StartDate,Iteration/EndDate),"
&"aggregate($count as Count, StoryPoints with sum as TotalStoryPoints)"
&")",
[#"Authorization" = "Basic " & apiKey]
, [Implementation="2.0",OmitValues = ODataOmitValues.Nulls,ODataVersion = 4])
diff正在将
WorkItemSnapshot
更改为WorkItemBoardSnapshot
,请注意,board snapshot使用的是Team
,而不是Teams我尝试过使用$expand
,但加载速度相当慢。嗨,rick,感谢您的分享,您可以接受您的答案。在这种情况下,其他人可以直接找到有用的解决方案。嗨,达曼,我尝试使用相同的:*WorkItemBoardSnapshot**表,我的目标是筛选并按Srint结束日期显示所有工作项的趋势,但是,每次我尝试:OData.Feed(“https://analytics.dev.azure.com/{organization}/{proyect}/_odata/v3.0-preview/WorkItemSnapshot?&“$apply=filter(DateValue eq迭代/StartDate)”,null,[Implementation=“2.0”,OmitValues=ODataMitValues.null,ODataVersion=4])
它总是抛出一个“空表”结果。你知道我错过了什么吗?