AND (MDX)
Performs a logical conjunction on two numeric expressions.
The AND operator treats both expressions as Boolean values (zero, 0, as false; otherwise, true) before the operator performs the logical conjunction. The following table illustrates how the AND operator performs the logical conjunction.
|
Expression1 |
Expression2 |
Return Value |
|---|---|---|
|
true |
true |
true |
|
true |
false |
false |
|
false |
true |
false |
|
false |
false |
false |
-- This query returns the gross profit margin (GPM)
-- for clothing sales where the GPM is between 20% and 30%.
With Member [Measures].[LowGPM] as
IIF(
[Measures].[Gross Profit Margin] <= .3 AND
[Measures].[Gross Profit Margin] >= .2,
[Measures].[Gross Profit Margin],
null)
SELECT NON EMPTY
[Sales Territory].[Sales Territory Country].Members ON 0,
[Product].[Category].[Clothing] ON 1
FROM
[Adventure Works]
WHERE
([Measures].[LowGPM])