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