Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I have a dataset and need to create a new column that counts the occurrences from a separate column for the previous minute from most recent occurrence. What is the easiest way to do this?
This is an example:
Timestamp | Text String Column | New Column with Count |
6/28/2023 8:34:00 | Apple | 3 |
6/28/2023 8:33:59 | Cherry | 2 |
6/28/2023 8:33:55 | Apple | 2 |
6/28/2023 8:33:35 | Apple | 1 |
6/28/2023 8:33:30 | Cherry | 1 |
6/28/2023 8:33:28 | Banana | 1 |
Hi @OUFores,
You can try to use the following formula if it suitable for your requirement:
formula =
CALCULATE (
COUNTROWS ( TableName ),
FILTER (
TableName,
TableName[Text String] = EARLIER ( TableName[Text String] )
&& TableName[Timestamp]
>= MAX ( TableName[Timestamp] ) - TIME ( 0, 1, 0 )
)
)
Regards,
Xiaoxin Sheng
User | Count |
---|---|
11 | |
9 | |
8 | |
7 | |
5 |
User | Count |
---|---|
24 | |
16 | |
15 | |
10 | |
7 |