Sep 07 2020
- last edited on
Apr 08 2022
Hi, im trying to get insightdata for office hours only. all examples i find is for one day only but I want to have a graph for a week but only 6am to 16pm. Can't figure it out. Anyone that can help.
Sep 07 2020 10:21 PMSolution
Hi @PatrikHansson ,
Try using hourofday() function and then filter the hours.
Link to the function dcumentation: https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/hourofdayfunction
InsightsMetrics | where TimeGenerated > ago(7d) | extend Hour = hourofday(TimeGenerated) | where Hour >= 6 and Hour < 16 | summarize sum(Val) by Computer, bin(TimeGenerated, 24h)