Skip to content

Instantly share code, notes, and snippets.

@Leonardo-Ferreira
Created August 16, 2021 22:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Leonardo-Ferreira/b203dc3083c655c9f45b1060fd8cb766 to your computer and use it in GitHub Desktop.
Save Leonardo-Ferreira/b203dc3083c655c9f45b1060fd8cb766 to your computer and use it in GitHub Desktop.
Kusto Sample - Compare data from your current week-day to N-last-weeks
requests
| where timestamp > ago(90d)
| where dayofweek(timestamp) == dayofweek(now())
| summarize count() by bin(todatetime(strcat("20210101 ", format_datetime(timestamp,"HH:mm:ss"))),5m),tostring(week_of_year(timestamp))
| render timechart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment