Forum Discussion

gavin007's avatar
gavin007
Helper V
5 years ago
Solved

invalid identifier for list.sum syntax

Hi, I use group by window to sum Rev Act and GM Act by InvoiceDate and OrderNo_Revised_Item. it all works well until I try to amend the sum of Rev Act by applying a condition in when evaluating the s...
  • ImkeF's avatar
    ImkeF
    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}})