Forum Discussion
Need Help Running Index that Resets
Like this?
let
Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
#"Grouped Rows" = Table.Group(Source, {" VARIABLE"}, {{"Details", each _, type table [MONTH=nullable text, DAY=nullable number, HOUR=nullable number, #" VARIABLE"=nullable text, VALUE=nullable number, STATUS=nullable number, CRITERIA=nullable number]}}),
Custom1 = Table.TransformColumns(#"Grouped Rows", {{"Details", each Table.AddIndexColumn(_, "Index", 1,1)}}),
#"Expanded Details" = Table.ExpandTableColumn(Custom1, "Details", {"MONTH", "DAY", "HOUR", " VARIABLE", "VALUE", "STATUS", "CRITERIA", "Index"}, {"MONTH", "DAY", "HOUR", " VARIABLE.1", "VALUE", "STATUS", "CRITERIA", "Index"})
in
#"Expanded Details"
--Nate
Hello, thanks for the help, i think we aproach to the objetive but still i need to make the counter reset every time the consecutive Status change,
Actually the counter is reseting when the Variable change, but it should also resets when the Status change, i attach an image of the Counter-ToBe