Sep 07 2020
07:12 AM
- last edited on
Apr 08 2022
10:37 AM
by
TechCommunityAP
Sep 07 2020
07:12 AM
- last edited on
Apr 08 2022
10:37 AM
by
TechCommunityAP
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 PM
SolutionHi @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
Example:
InsightsMetrics
| where TimeGenerated > ago(7d)
| extend Hour = hourofday(TimeGenerated)
| where Hour >= 6 and Hour < 16
| summarize sum(Val) by Computer, bin(TimeGenerated, 24h)
Rafi