calculated column counting consecutive identical values

Bo_dk

New Member
Joined
Mar 18, 2021
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
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
midlertid.xlsx
GHIJ
1TimeStampLocal StateCategoryName Index Consecutive identical values
210/03/2021 00:00 Downtime 0 2
310/03/2021 00:15 Downtime 1 1
410/03/2021 00:30 Uptime 2 1
510/03/2021 00:45 Downtime 3 2
610/03/2021 01:00 Downtime 4 1
710/03/2021 01:15 Uptime 5 5
810/03/2021 01:30 Uptime 6 4
910/03/2021 01:45 Uptime 7 3
1010/03/2021 02:00 Uptime 8 2
1110/03/2021 02:15 Uptime 9 1
1210/03/2021 02:30 Downtime 10 16
1310/03/2021 02:45 Downtime 11 15
1410/03/2021 03:00 Downtime 12 14
1510/03/2021 03:15 Downtime 13 13
1610/03/2021 03:30 Downtime 14 12
1710/03/2021 03:45 Downtime 15 11
1810/03/2021 04:00 Downtime 16 10
1910/03/2021 04:15 Downtime 17 9
2010/03/2021 04:30 Downtime 18 8
2110/03/2021 04:45 Downtime 19 7
2210/03/2021 05:00 Downtime 20 6
2310/03/2021 05:15 Downtime 21 5
2410/03/2021 05:30 Downtime 22 4
2510/03/2021 05:45 Downtime 23 3
2610/03/2021 06:00 Downtime 24 2
2710/03/2021 06:15 Downtime 25 1
Sheet2
Cell Formulas
RangeFormula
G2:G27G2=+TEXT(A2,"mm/dd/eeee")&" "&B2
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,224,823
Messages
6,181,180
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top