Forum Discussion

dmarlow's avatar
dmarlow
Copper Contributor
Nov 05, 2019

Help with query: two graphs, one data set

I'm querying IIS logs and trying to create a graph that shows requests over time and errors over time on a single graph. I can display these two separately, but I'd like them to be in one graph if possible. I'm defining "errors" as toint(scStatus) >= 500. I can get it to display multiple dimensions if I show all possible scStatus values, but I don't want the extra noise. How can I get it to show all requests over time, then, as another line, only the requests where scStatus is >= 500?

 

1 Reply

  • dmarlow's avatar
    dmarlow
    Copper Contributor

    I think this is the solution:

     

    | summarize requests = count(),
    errors = countif(toint(scStatus) >= 500)
    by bin(TimeGenerated, 10m)

Resources