Forum Discussion
ptrick37
3 years agoNew Member
List.Generate creates list with more rows than expected
(table1 as table, fault_status as number, Index as number, ID as text)=> let row_count = Table.RowCount(table1), current_row = Table.SelectRows(table1, each [ID] = ID), Index = current_row[Ind...
wdx223_Daniel
3 years agoCommunity Champion
let
source=table1,
custom1=Table.FromRecords(List.Accumulate(Table.ToRecords(source),{{},[]},(x,y)=>let a=(Record.FieldOrDefault(x{1},y[ID],0)+y[falult_status])*y[fault_status] in {x{0}&{y&[NewCol=a]},x{1}&Record.AddField([],y[ID],a)}){0})
in
custom1
- ptrick373 years agoNew Member
Thank you for your reply, could you be able to tell me what was wrong with my method above? To my understanding this should have worked.
- ptrick373 years agoNew Member
Also when I run this solution it was taking more than 1 hour to run with 150 entries so I killed it. Is this normal for power bi?