SOLVED

Ignore bucket based on offset

Iron Contributor

I'm trying to visualize the number of Heartbeats in 1 hour buckets for the last 48 hours. However, no matter what I use for an offset, I get a drop in amount at the beginning and end of the dataset:

Annotation 2020-02-24 142821.png

How can I get rid of these in the visual (they're confusing)?

2 Replies
best response confirmed by Scott Allison (Iron Contributor)
Solution

@Scott Allison

 

I suspect you have values below 300,000 due to the time you run the query, if it runs in the morning lets say 9am, you get a small count from midnight to 8am that day (where as the previous whole day will always have more results)- hence the lower number.

 

Heartbeat
| where TimeGenerated between (startofday(ago(2d))..startofday(ago(0d)))
| summarize Rows=count() by bin(TimeGenerated, 1h)
| render timechart 

This would be a example to get two whole days (midnight to midnight), to get rid of those two varying data points.  I'm a fan of "startofday" for this reason. https://docs.microsoft.com/en-us/azure/kusto/query/startofdayfunction

 

 

 

@CliveWatson to the rescue again. It trims my first bucket properly, but my last bucket still has that drop off--I can live with that. Thanks!

1 best response

Accepted Solutions
best response confirmed by Scott Allison (Iron Contributor)
Solution

@Scott Allison

 

I suspect you have values below 300,000 due to the time you run the query, if it runs in the morning lets say 9am, you get a small count from midnight to 8am that day (where as the previous whole day will always have more results)- hence the lower number.

 

Heartbeat
| where TimeGenerated between (startofday(ago(2d))..startofday(ago(0d)))
| summarize Rows=count() by bin(TimeGenerated, 1h)
| render timechart 

This would be a example to get two whole days (midnight to midnight), to get rid of those two varying data points.  I'm a fan of "startofday" for this reason. https://docs.microsoft.com/en-us/azure/kusto/query/startofdayfunction

 

 

 

View solution in original post