Hello master minds ,
I have a Power BI data set with TimeStamps.
Each are 15 minutes apart.
I would like to create a column that counts the number of consecutive timestamps with the same StatecategoryName.
This is an Excel sample of my data in columns 'G'-'I'.
The results I want to calculate are in column 'J
Thanks in advance
Bo
I have a Power BI data set with TimeStamps.
Each are 15 minutes apart.
I would like to create a column that counts the number of consecutive timestamps with the same StatecategoryName.
This is an Excel sample of my data in columns 'G'-'I'.
The results I want to calculate are in column 'J
Thanks in advance
Bo
midlertid.xlsx | ||||||
---|---|---|---|---|---|---|
G | H | I | J | |||
1 | TimeStampLocal | StateCategoryName | Index | Consecutive identical values | ||
2 | 10/03/2021 00:00 | Downtime | 0 | 2 | ||
3 | 10/03/2021 00:15 | Downtime | 1 | 1 | ||
4 | 10/03/2021 00:30 | Uptime | 2 | 1 | ||
5 | 10/03/2021 00:45 | Downtime | 3 | 2 | ||
6 | 10/03/2021 01:00 | Downtime | 4 | 1 | ||
7 | 10/03/2021 01:15 | Uptime | 5 | 5 | ||
8 | 10/03/2021 01:30 | Uptime | 6 | 4 | ||
9 | 10/03/2021 01:45 | Uptime | 7 | 3 | ||
10 | 10/03/2021 02:00 | Uptime | 8 | 2 | ||
11 | 10/03/2021 02:15 | Uptime | 9 | 1 | ||
12 | 10/03/2021 02:30 | Downtime | 10 | 16 | ||
13 | 10/03/2021 02:45 | Downtime | 11 | 15 | ||
14 | 10/03/2021 03:00 | Downtime | 12 | 14 | ||
15 | 10/03/2021 03:15 | Downtime | 13 | 13 | ||
16 | 10/03/2021 03:30 | Downtime | 14 | 12 | ||
17 | 10/03/2021 03:45 | Downtime | 15 | 11 | ||
18 | 10/03/2021 04:00 | Downtime | 16 | 10 | ||
19 | 10/03/2021 04:15 | Downtime | 17 | 9 | ||
20 | 10/03/2021 04:30 | Downtime | 18 | 8 | ||
21 | 10/03/2021 04:45 | Downtime | 19 | 7 | ||
22 | 10/03/2021 05:00 | Downtime | 20 | 6 | ||
23 | 10/03/2021 05:15 | Downtime | 21 | 5 | ||
24 | 10/03/2021 05:30 | Downtime | 22 | 4 | ||
25 | 10/03/2021 05:45 | Downtime | 23 | 3 | ||
26 | 10/03/2021 06:00 | Downtime | 24 | 2 | ||
27 | 10/03/2021 06:15 | Downtime | 25 | 1 | ||
Sheet2 |
Cell Formulas | ||
---|---|---|
Range | Formula | |
G2:G27 | G2 | =+TEXT(A2,"mm/dd/eeee")&" "&B2 |