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:
I want to know how many rows are sharing unique values on the “incident” and “number” columns:
COUNTROWS(GROUPBY('table','table'[argument1],'table'[argument2]))
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"))
I want to sum “number” based on unique values for the “incident” and “number” columns:
SUMX(GROUPBY('table','table'[argument1],'table'[argument2]),'table'[argument2])
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])
Interesting Topics
-
Be successfully certified ITIL 4 Managing Professional
Study, study and study, I couldn’t be successfully certified without studying it, if you are interested...
-
Be successfully certified ITIL 4 Strategic Leader
With my ITIL 4 Managing Professional certification (ITIL MP) in the pocket, it was time to go for the...
-
Hide visual and change background color based on selection
Some small tricks to customize the background colour of a text box...
-
Stacked and clustered column chart or double stacked column chart
In excel, I use a lot the combination of clustered and stacked chart...