sum by group new measure power bi code example
Example 1: group by in power bi
GROUPBY (<table>, [<groupBy_columnName1>], [<name>, <expression>]… )
Example 2: power bi sum group by
Total value by category =
VAR
category = [Category]
RETURN
CALCULATE(SUM([Value]), FILTER(Table1, [Category] = category))