Forum Discussion
Tan_LC
Helper II
3 years agoSUMIF using M Query
Hi, in below table, I would like to calculate Sum of Qty based on Date with additional column created. I've tried using below M Query but error pop up. Please refer Desired Outcome table for detail...
AlienSx
Super User
3 years agoHi, Tan_LC
groups = Table.Group(before, {"Date"}, {{"rows", each _, type table [Date=nullable date, Factory=nullable text, Qty=nullable number]}, {"Sum of Qty", each List.Sum([Qty]), type nullable number}}),
after = Table.ExpandTableColumn(groups, "rows", {"Factory", "Qty"}, {"Factory", "Qty"})