Forum Discussion
Data with an uncertain start point
- 3 years ago
In Power Query
Starting with
-add an index column starting from 1
Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type)
-find the lowest value of the index column where the RPM = 1850
Table.AddColumn(#"Added Index", "initialZero", each List.Min(Table.SelectRows(#"Added Index", (x)=>x[RPM]=1850)[Index]) )
-subtract the initialZero column from the Index column
Table.AddColumn(#"Added Custom", "Relative Time", each [Index] - [initialZero])
-remove the Index and intialZero columns
Table.RemoveColumns(#"Added Custom1",{"Index", "initialZero"})
and you should end up with
In Power Query
Starting with
-add an index column starting from 1
Table.AddIndexColumn(#"Changed Type", "Index", 1, 1, Int64.Type)
-find the lowest value of the index column where the RPM = 1850
Table.AddColumn(#"Added Index", "initialZero", each List.Min(Table.SelectRows(#"Added Index", (x)=>x[RPM]=1850)[Index]) )
-subtract the initialZero column from the Index column
Table.AddColumn(#"Added Custom", "Relative Time", each [Index] - [initialZero])
-remove the Index and intialZero columns
Table.RemoveColumns(#"Added Custom1",{"Index", "initialZero"})
and you should end up with