Power BI: get a value if 2 conditions are met
When I need that 2 criteria or more are met in order to get a value, I use “&&”, saying this way, it looks very abstract. Imagine that I want to show yes or no if 1 condition is met, this is the formula:
IF('table'[argument]="xxx","yes","no")
Now for 2 conditions:
IF('table'[argument1]="xxx" && 'table'[argument2]="yyy","yes","no")
Let’s do some example, with 1 condition:
Here I am asking to say “yes” if the priority is P4.
With 2 conditions:
Here I am asking to say “yes” if the priority is P3 and if the ticket has been created before 28/06.
If I want 3 criteria, I will just add another “&&”. The principle is the same if I want to use other functions, for instance:
COUNTROWS(FILTER(ALLSELECTED('table'),'table'[argument1]="xxx" && 'table'[argument2]="xxx"))
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...