This is an example of a grouping I have here with a count column:
ClearCollect(colGroupsRelation,
SortByColumns(
AddColumns(
GroupBy(colAppServersRelationAll, "ServerID","ServerGroup"),
"AppCount",
CountRows(ServerGroup)
),
"AppCount", Descending)
);
To Explain:
- GroupBy(MyCollection, "Grouping On", "Name of the group")
- AddColumns(MyCollection - 'note how I'm using the GroupBy', "Column Name", "Expression")
- SortByColumns(MyCollection, "Column To Sort", "Direction to sort"),
You case might be like
AddColumns(
GroupBy(YourDataSource, "Incident Types","IncidentTypesGroup"),
"IncidentCountTotal",
Sum(IncidentTypesGroup,IncidentCount)
)