电子表格 Libreoffice calc - 数据透视表 - 如何对至少间隔 30 分钟的时间块进行分组
我在 libreoffice calc 中有一份报告,其中包含 2 张纸。 第一个是数据表,第二个是“报告”表(带有数据透视表)。
在第一个数据表中,有 3 个重要的列,第一列有日期,第二列有时间戳,第三列有称为“类型”的产品代码。
我正在尝试创建一个数据透视表,它会自动显示每个日期、每个“时间块”(至少间隔 30 分钟)、每种类型的类型计数。
麻烦在于如何创造时间块。两个时间戳之间至少需要有 30 分钟的时间才能被视为一段时间。
例如,数据表:
日期 | 时间 | 类型 |
---|---|---|
17.01.22 | 9:13 | 12 |
17.01.22 | 9:14 | 12 |
17.01.22 | 9:15 | 17 |
17.01.22 | 9:20 | 17 |
17.01.22 | 9:22 | 17 |
17.01.22 | 12:28 | 17 号 |
17.01.22 | 12:42 | 17 |
17.01.22 | 15:16 | 17 |
17.01.22 | 15:42 | 17 |
17.01.22 | 15:55 | 13 |
17.01.22 | 15:58 | 13 |
The end result in a pivot table should be:
日期 | 时间帧 | 类型 | 计数类型 |
---|---|---|---|
17.01.22 | 9:13- 9:22 | 12 | 2 |
17.01.22 | 9:13-9:22 | 17 | 3 |
17.01.22 | 12:28-12:42 | 17 | 2 |
17.01.22 | 15:16-15 :58 | 17 | 2 |
17.01.22 | 15:16-15:58 | 13 | 2 |
或
日期 | 时间帧 | 类型 | 计数类型 |
---|---|---|---|
17.01.22 | 9:13-9:22 | 12 | 2 |
17 | 3 | ||
17.01.22 | 12:28-12:42 | 17 | 2 |
17.01.22 | 15:16-15:58 | 17 | 2 |
13 | 2 |
如果您有任何问题,请告诉我。 并提前感谢您。
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
最后我走了这条路:
https://ask.libreoffice.org/t/how-to-group-chuckks-of-time-seperated-by-a-minimum-of-30-mins-pivot-table/74936
它使用此论坛创建了一个帮助列:
in C2:=IF((N(A2)+N(B2)-N(A1)-N(B1))>(1/48);N(C1)+1;N(C1)
那么最终结果是:
At the end I went this route:
https://ask.libreoffice.org/t/how-to-group-chuncks-of-time-seperated-by-a-minimum-of-30-mins-pivot-table/74936
Which creates a helper column with this forumla:
in C2:=IF((N(A2)+N(B2)-N(A1)-N(B1))>(1/48);N(C1)+1;N(C1)
Then end result is: