Forum Discussion
invalid identifier for list.sum syntax
- 5 years ago
Hi gavin007 ,
yes, I didn't pay attention to the other code. Problem is, that you have used the "each"-keyword twice and now the syntax sugar doesn't know what to refer to.
Therefore I'd recommend to transform at least one of the functions to the explicit syntax:Table.Group(Source, {"InvoiceDate", "OrderNo_Revised_Item"}, {{"Ext Rev Act", each List.Sum(Table.SelectRows(Source, (row) => row[#"I/C"]="C") [Rev Act]), type nullable number}, {"GM Act", each List.Sum([GM Act]), type nullable number}})
hi gavin007
I wonder if you wanted to add [Rev Act] for the entire Source table or just for each sub-group.
In the latter case, you should replace Source with _.
then from
Table.SelectRows(Source, each [I/C]="C") [Rev Act])
to
Table.SelectRows(_, each [I/C]="C") [Rev Act])
In general, for faster and more useful help you should provide the expected and the input data and if any error appears in your code, the complete copy of the code used.
Anonymous that actual help. Many Thanks!