电子表格 Libreoffice calc - pivot table - 如何对至少间隔 30 分钟的时间块进行分组

Spreadsheet Libreoffice calc - pivot table - How to group chuncks of time seperated by a minimum of 30 mins

我在 libreoffice calc 中有一份报告,其中包含 2 sheets。 第一个是数据 sheet,第二个是“报告”sheet(带主元 tables)。

在第一个数据sheet中,有3个重要的列,第一列是日期,第二列是时间戳,第三列是产品代码,叫做“Type”。

我正在尝试创建一个枢轴 table,它会自动显示每个日期、每个“时间块”,间隔至少 30 分钟,每个类型的类型计数。

麻烦来自于如何创建时间块。 2 个时间戳之间至少需要间隔 30 分钟才能算作时间块。

例如,数据 sheet:

Date Time Type
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

枢轴 table 的最终结果应该是:
Date Time-Frame Type Count-Type
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

Date Time-Frame Type Count-Type
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

如果您有任何问题,请告诉我。 提前谢谢你。

最后我走了这条路: https://ask.libreoffice.org/t/how-to-group-chuncks-of-time-seperated-by-a-minimum-of-30-mins-pivot-table/74936

使用此论坛创建帮助列: 在 C2 中:=IF((N(A2)+N(B2)-N(A1)-N(B1))>(1/48);N(C1)+1;N(C1)

那么最终结果是:

Date Time Type
17.01.22 9:13 1
17.01.22 9:14 1
17.01.22 9:15 1
17.01.22 9:20 1
17.01.22 9:22 1
17.01.22 12:28 2
17.01.22 12:42 2
17.01.22 15:16 3
17.01.22 15:42 3
17.01.22 15:55 3
17.01.22 15:58 3