Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/powerbi/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Azure devops 从Power BI中的Azure DevOps创建跨组织Sprint燃尽图表_Azure Devops_Powerbi_Odata - Fatal编程技术网

Azure devops 从Power BI中的Azure DevOps创建跨组织Sprint燃尽图表

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=

我在下面的查询中创建了Azure DevOps中的Sprint Burndown跨组织。它工作得又细又滑

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])
它总是抛出一个“空表”结果。你知道我错过了什么吗?