如何使 make_series 按小时分组而不是在查询 运行 的确切时间分组

How to make make_series group by top of the hour and not on the exact time when query is run

以下查询获取我的每小时销售额,当没有销售额时空闲时间为 0

tilldevicedata
| where todatetime(TransactionTimeStampUtc) between (_startTime.._endTime)
| where Brand has_any (_brand)
| where Country == _country
| where Store has_any (_store)
| make-series sum(TransactionValueGross) on todatetime(TransactionTimeStampUtc) from _startTime to _endTime step 1h

问题是生成的时间戳是查询 运行 的确切时间,如下所示

"TransactionTimeStampUtc": [
    "2022-05-13T07:40:22.0000000Z",
    "2022-05-13T08:40:22.0000000Z",
    "2022-05-13T09:40:22.0000000Z",
    "2022-05-13T10:40:22.0000000Z",
    "2022-05-13T11:40:22.0000000Z",
    "2022-05-13T12:40:22.0000000Z",
    "2022-05-13T13:40:22.0000000Z",
    "2022-05-13T14:40:22.0000000Z",
    "2022-05-13T15:40:22.0000000Z",
    "2022-05-13T16:40:22.0000000Z",
    "2022-05-13T17:40:22.0000000Z",
    "2022-05-13T18:40:22.0000000Z",
    "2022-05-13T19:40:22.0000000Z",
    "2022-05-13T20:40:22.0000000Z",
    "2022-05-13T21:40:22.0000000Z",
    "2022-05-13T22:40:22.0000000Z",
    "2022-05-13T23:40:22.0000000Z",
    "2022-05-14T00:40:22.0000000Z",
    "2022-05-14T01:40:22.0000000Z",
    "2022-05-14T02:40:22.0000000Z",
    "2022-05-14T03:40:22.0000000Z",
    "2022-05-14T04:40:22.0000000Z",
    "2022-05-14T05:40:22.0000000Z",
    "2022-05-14T06:40:22.0000000Z"
],

我希望它在小时的最前面,所以在 07:00:00 和 08:00:00 这样说,那一小时内的所有内容都会在小时时间戳的最前面,因为当值不准确时,生成的柱形图看起来不正确。

这能实现吗?

正如你在图片中看到的那样,我 运行 在 hh:07 的查询,所以它稍微向小时的右侧移动,我 运行 查询越晚它们将移动到图表中显示的小时顶部的右侧,我希望它们始终准确显示在 hh:00:00 以便它们看起来以发生在

的小时为中心

如果您不使用 from,步长将与整小时对齐。
如果您使用 from,则步长与 from 值对齐。

from bin(_startTime,1h) to _endTime