NEBO
Platí pro: Výpočet počítané tabulky Počítaná tabulka Výpočet vizuálu
Zkontroluje, zda jeden z argumentů má hodnotu PRAVDA, aby vrátil hodnotu PRAVDA. Funkce vrátí hodnotu NEPRAVDA, pokud jsou oba argumenty NEPRAVDA.
Syntaxe
OR(<logical1>,<logical2>)
Parametry
Pojem | definice |
---|---|
logical_1, logical_2 | Logické hodnoty, které chcete testovat. |
Vrácená hodnota
Logická hodnota. Hodnota JE PRAVDA, pokud některý ze dvou argumentů je PRAVDA; hodnota JE NEPRAVDA, pokud jsou oba argumenty NEPRAVDA.
Poznámky
Funkce OR v jazyce DAX přijímá pouze dva (2) argumenty. Pokud potřebujete provést operaci OR s více výrazy, můžete vytvořit řadu výpočtů nebo lépe pomocí operátoru OR (||) spojit všechny výrazy v jednodušším výrazu.
Funkce vyhodnotí argumenty do prvního argumentu PRAVDA a vrátí hodnotu PRAVDA.
Příklad
Následující příklad ukazuje, jak pomocí funkce OR získat prodejní osoby, které patří do Kruh of Excellence. Circle of Excellence rozpozná ty, kteří v roce 2007 dosáhli více než milion dolarů v prodeji Touring Bikes nebo prodeji více než dvou a půl milionu dolarů.
IF( OR( CALCULATE(SUM('ResellerSales_USD'[SalesAmount_USD]), 'ProductSubcategory'[ProductSubcategoryName]="Touring Bikes") > 1000000
, CALCULATE(SUM('ResellerSales_USD'[SalesAmount_USD]), 'DateTime'[CalendarYear]=2007) > 2500000
)
, "Circle of Excellence"
, ""
)
Návraty
Popisky řádků | 2005 | 2006 | 2007 | 2008 | - | Celkový součet |
---|---|---|---|---|---|---|
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 | |||||
Celkový součet | Circle of Excellence | Circle of Excellence | Circle of Excellence | Circle of Excellence | Circle of Excellence | Circle of Excellence |