skip to Main Content

I have a mental block and can´t figure this one out.
In Azure Application Insights I have this custom table. I am trying to create an index of actual work. The table has this "event" column where you can have several types of transactions. I am trying to get a single number that represents a porcentage of actual work. One of the transactions is "UploadSuccess". I want to have total amount of UploadSuccess divided by TotalAmount of transactions by 100.

I first attempted:

let ActualWork = Table
| project Event
| where Event == 'UploadSuccess'
| summarize count();
let AllWork = Table
| project Event
| summarize count();
<here is where I am stuck. How do I use ActualWork and AllWork>

So then I tried:

let ActualWork = Table
| project Event
| where Event == 'UploadSuccess'
| summarize count();
Table
| project Event
| evaluate ((ActualWork/count())*100)

AND 
| summarize ((ActualWork/count())*100) //here I cannot parse ActualWork

Any thoughts on how I can solve it?

2

Answers


  1. Chosen as BEST ANSWER

    Thanks, I was able to solve it with your example. Here is what i did:

    Table
    | summarize upload_success = toreal(countif(Event == 'UploadSuccess')),
                all = toreal(count())
    | project percentage = round(100.0 * upload_success / all , 2)
    

  2. you could try this:

    Table
    | summarize upload_success = countif(Event == 'UploadSuccess'),
                all = count()
    | project percentage = round(100.0 * upload_success / all , 2)
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search