Forum Discussion
michaelsh
5 years agoKudo Kingpin
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...
- 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
Anonymous
5 years agoNot applicable
I'm not ssure if you want a single value in each list, or the whole column in each list, but here is the syntax for nested list column with single value in each list:
= Table.AddColumn(#"Added Custom", "New Table", each Table.AddColumn([Custom], "Running Total", each {[Amt]}))
--Nate