Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
prabhatnath
Advocate III
Advocate III

Getting Similar Result from a Flat OData Connection Result

Hi Friends,

 

I am working with Pass Rate Trends from Azure DevOps Pipelines and following documentation below.

https://learn.microsoft.com/en-us/azure/devops/report/powerbi/sample-pipelines-pass-rate-trend?view=... 

 

The document is the following query to get data and the query is only for a Single named Pipeline and is already grouped.

 

let
   Source = OData.Feed ("https://analytics.dev.azure.com/{organization}/{project}/_odata/v3.0-preview/PipelineRuns?"
        &"$apply=filter( "
                &"Pipeline/PipelineName eq '{pipelineName}' "
                &"and CompletedDate ge {startdate} "
                &"and CanceledCount ne 1 "
        &") "
        &"/groupby( "
            &"(CompletedOn/Date), "
                &"aggregate "
                &"($count as TotalCount, "
            &"SucceededCount with sum as SucceededCount , "
                &"FailedCount with sum as FailedCount, "
            &"PartiallySucceededCount with sum as PartiallySucceededCount)) "
        &"/compute( "
    &"SucceededCount mul 100.0 div TotalCount as PassRate, "
    &"FailedCount mul 100.0 div TotalCount as FailRate, "
    &"PartiallySucceededCount mul 100.0 div TotalCount as PartiallySuccessfulRate) "
    &"&$orderby=CompletedOn/Date asc "
    ,null, [Implementation="2.0",OmitValues = ODataOmitValues.Nulls,ODataVersion = 4]) 
in
    Source

 

In my case I am using a Flat query as below:

 

https://analytics.dev.azure.com/{OrgName}/{ProjectName}/_odata/v3.0-preview/PipelineRuns?$apply=filter(CompletedDate ge 2023-06-01Z)

 

This will pull all Pipelines and the user will select the Pipeline that they wanted to see the Pass Rate Trend. I think using the named pipeline in the $apply=filter of the example code above is the same as allowing users to select the Pipeline from a dropdown.

 

As I am new to OData and PBI so looking for help/guidance to help me achieve the same result specific to getting the aggregated output based on Group By from a Flat Query.

 

Please suggest what shall be done to get: TotalCount, SucceededCount, FailedCount, PartiallySucceededCount ?

 

Thanks,

Prabhat 

0 REPLIES 0

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.