Forum Discussion

michaelsh's avatar
michaelsh
Kudo Kingpin
5 years ago
Solved

Column to List inside a nested table

Background: I want to calculate a Running Total by Group without using a function. I need help with just one little issue: How do I convert an "Amt" column to a List inside a nested table in a "Cus...
  • mahoneypat's avatar
    5 years ago

    A running total is done more easily in DAX and should be done there.  However, one way to do it in the query editor is to use this as your last step in your query.

     

    = Table.AddColumn(#"Added Custom", "NewTable", each let thistable = [Custom] in Table.AddColumn(thistable, "RT", each List.Sum(Table.FirstN(thistable, _[Index])[Amt])))

     

    Pat