OR Function (DAX)
Checks whether one of the arguments is TRUE to return TRUE. The function returns FALSE if all arguments are FALSE.
OR(<logical1>,<logical2>,…)
Parameters
Term |
Definition |
logical_1, logical_2,… |
The logical values you want to test. |
Return Value
A Boolean value. The value is TRUE if any of the arguments is TRUE; the value is FALSE if all the arguments are FALSE.
Remarks
The function evaluates the arguments until the first TRUE argument, then returns TRUE.
Example
The following example shows how to use the OR function to obtain the sales people that belong to the Circle of Excellence. The Circle of Excellence is recognizes those who have achieved more than a million dollars in Touring Bikes sales or sales of over two and a half million dollars in 2003.
SalesPersonFlag |
True |
|
|
|
|
|
|
|
|
|
|
|
|
OR function |
Column Labels |
|
|
|
|
|
Row Labels |
2001 |
2002 |
2003 |
2004 |
|
Grand Total |
Abbas, Syed E |
|
|
|
|
|
|
Alberts, Amy E |
|
|
|
|
|
|
Ansman-Wolfe, Pamela O |
|
|
|
|
|
|
Blythe, Michael G |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Campbell, David R |
|
|
|
|
|
|
Carson, Jillian |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Ito, Shu K |
|
|
|
|
|
|
Jiang, Stephen Y |
|
|
|
|
|
|
Mensa-Annan, Tete A |
|
|
|
|
|
|
Mitchell, Linda C |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Pak, Jae B |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Reiter, Tsvi Michael |
|
|
|
|
|
|
Saraiva, José Edvaldo |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Tsoflias, Lynn N |
|
|
|
|
|
|
Valdez, Rachel B |
|
|
|
|
|
|
Vargas, Garrett R |
|
|
|
|
|
|
Varkey Chudukatil, Ranjit R |
|
|
|
|
|
Circle of Excellence |
Grand Total |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
Circle of Excellence |
IF( OR( CALCULATE(SUM('ResellerSales_USD'[SalesAmount_USD]), 'ProductSubcategory'[ProductSubcategoryName]="Touring Bikes") > 1000000
, CALCULATE(SUM('ResellerSales_USD'[SalesAmount_USD]), 'DateTime'[CalendarYear]=2003) > 2500000
)
, "Circle of Excellence"
, ""
)