Search code examples
azureazure-application-insightsdashboard

Application insights dashboard pie chart doesnt work as expected


| where client_Type != "Browser"
| summarize count() by toint(resultCode)
| extend iff(toint(resultCode)<500,'pass','fail')
| render piechart

This simple query doesnt work as expected, i'm expecting piechart with two slices...one for fail and another one for pass. But results are weird

enter image description here

enter image description here


Solution

  • You should change your query like below:

    requests 
    | extend passOrNot=iff(toint(resultCode)<500,'pass','fail')
    | summarize count() by passOrNot, resultCode
    | render piechart
    

    The test result:

    enter image description here

    enter image description here