Skip to content

Instantly share code, notes, and snippets.

@Curts0
Created April 14, 2022 19:48
Show Gist options
  • Save Curts0/c6bc0fd71cf4a2710a1b529a722351f5 to your computer and use it in GitHub Desktop.
Save Curts0/c6bc0fd71cf4a2710a1b529a722351f5 to your computer and use it in GitHub Desktop.
Total Column Usage Count
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
| extend extract_column = extract_all(@"('.*?'\[.*?\])",TextData_s)
| mv-expand extract_column
| summarize Total_Number_Queried=dcount(SPID_s) by Table_Column= tostring(extract_column)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment