Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Group Consecutuve rows (timestamps)

Hi,   I have some trouble with grouping consecutive timestamps as 1. The Data is kind of alarmdata, so a row only appears when alarm is on. Every consecutive second it is "on" that means it is the ...
  • Zubair_Muhammad's avatar
    Zubair_Muhammad
    7 years ago

    Anonymous 

     

    Please see attached file.

    I added an Index Column then

    I have added 2 custom columns "AlarmStart" and "AlarmEnd"

    AlarmStart=let mytime=[timestamp]-#duration(0, 0, 0, 1),
    myindex=[Index] in
    try if Table.SelectRows(#"Added Index",each [Index]=myindex-1)[timestamp]{0}=mytime then null else [timestamp]
    otherwise
    [timestamp]