Query Details
let _AuxiliaryTables = dynamic([
"OfficeActivity", "AzureActivity", "Heartbeat",
"SentinelHealth", "SecurityAlert", "SecurityIncident", "Operation"
]);
let _Top10 =
Usage
| where TimeGenerated > ago(30d)
| where IsBillable == true
| where DataType !in (_AuxiliaryTables)
| summarize TotalMB = sum(Quantity) by DataType
| top 10 by TotalMB desc
| project DataType;
Usage
| where TimeGenerated > ago(30d)
| where IsBillable == true
| where DataType in (_Top10)
| summarize DailyGB = round(sum(Quantity) / 1024.0, 3) by Day = bin(TimeGenerated, 1d), DataType
| order by Day asc, DailyGB desc
This KQL (Kusto Query Language) query is designed to analyze data usage over the past 30 days. Here's a simple breakdown of what it does:
Define Auxiliary Tables: It starts by defining a list of auxiliary table names that are not of interest for the main analysis. These tables include "OfficeActivity," "AzureActivity," "Heartbeat," "SentinelHealth," "SecurityAlert," "SecurityIncident," and "Operation."
Identify Top 10 Data Types:
Usage table to find records from the last 30 days (TimeGenerated > ago(30d)) that are billable (IsBillable == true).Calculate Daily Usage for Top Data Types:
Usage table for the last 30 days of billable data.In summary, this query identifies the top 10 data types with the highest usage over the past 30 days and then calculates and orders their daily usage in gigabytes.

David Alonso
Released: April 8, 2026
Tables
Keywords
Operators