Skip to content

Instantly share code, notes, and snippets.

@Curts0
Created April 14, 2022 19:50
Show Gist options
  • Save Curts0/ead1bd98321dbdc4155aefe042ff7992 to your computer and use it in GitHub Desktop.
Save Curts0/ead1bd98321dbdc4155aefe042ff7992 to your computer and use it in GitHub Desktop.
Avg & Total Load Time by Visual & Report
AzureDiagnostics
| where OperationName == "QueryEnd"
| where EventSubclass_s == 3
| where Resource == "ENTERAZURERESOURCE" //Enter Azure Resource
| where ApplicationName_s == "PowerBI"
| where TimeGenerated > ago(30d) //Remove if you would prefer to use the time selection in Azure
| summarize
avg_load_time_sec = avg(toint(Duration_s)) / 1000,
sum_load_time_sec = sum(toint(Duration_s)) / 1000,
count_queries = count()
by ApplicationContext_s,Resource
| extend ReportId_ = tostring(parse_json(tostring(parse_json(ApplicationContext_s).Sources))[0].ReportId)
| extend VisualId_ = tostring(parse_json(tostring(parse_json(ApplicationContext_s).Sources))[0].VisualId)
| extend ReportUrl = strcat('https://app.powerbi.com/groups/me/reports/', ReportId_)
| project-away ApplicationContext_s,Resource
| order by sum_load_time_sec desc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment