Hi,
Workbook both examples attached.
I have added the summed values of one table into another and multiplied by a value in that table ;
Table.AddColumn(Source, "Revenue", each
List.Sum(
Table.SelectRows( #"Sales Table", (A)=> A[Item] = _ [Item] ) [Sales]
)
*[Price] )
And I've been trying to do, but using 'Merge', and then the Aggregate option from expand,; I can use List count and then change to sum,
Table.AggregateTableColumn(#"Merged Queries", "Sales Table", {{"Sales", List.Sum , "Sum of Sales"}})
This gives me the sum of sales for each category, two things, I can then time this by 'price' column, two things can I is it possible to muliply by 'price' at this stage as in the first example, and is there a way to add data type within each aggregation?
I looked at MS docs and all I can see is a feature 'type table', is this the only way?
Richard.
Bookmarks