Power BI: calculate values based on multiple unique conditions

I have this table and what I want, it is to calculate the value based on unique criteria for 2 columns or more:

power bi

I want to know how many rows are sharing unique values on the “incident” and “number” columns:

COUNTROWS(GROUPBY('table','table'[argument1],'table'[argument2]))

power bi
power bi

NOTE: instead to use “GROUPBY”, I can use “SUMMARIZE”

And if I want only for a specific criteria, for instance “type = E”:

COUNTROWS(FILTER(GROUPBY('table','table'[argument1],'table'[argument2],'table'[argument3]),'table'[argument3]="value"))

power bi
power bi

I want to sum “number” based on unique values for the “incident” and “number” columns:

SUMX(GROUPBY('table','table'[argument1],'table'[argument2]),'table'[argument2])

power bi
power bi

And if I want only for a specific criteria, for instance “type = E”:

SUMX(FILTER(GROUPBY('table','table'[argument1],'table'[argument2],'table'[argument3]),'table'[argument3]="value"),'table'[argument2])

power bi
power bi

Interesting Topics