MDX - 如果选择了链接操作,则不显示联系人
MDX - do no show contacts if the linked action is selected
我有一个模型,其中包含一个度量组,其中一行表示特定 "Action" 的每个联系 "Person"。
现在我想让我的维度 "Action" 表现如下:
我 select 一个 "Action" 只有所有 "Persons" 联系的人可能会显示在该特定操作中不存在。
即使 "Person" 存在于 selected "action" 和另一个 "action" 中,"Person" 也可能不会显示。
这是您可以使用的潜在模式。第 3 组排除所有购买 [Bottles and Cages]
的客户,然后用于后续查询。
WITH
SET [customers] AS
{
[Customer].[Customer].&[15568]
,[Customer].[Customer].&[12067]
,[Customer].[Customer].&[21414]
,[Customer].[Customer].&[18695]
}
SET [custWhoBoughtBottlesAndCages] AS
NonEmpty
(
[customers]
,[Product].[Product Categories].[Subcategory].[Bottles and Cages]
)
SET [custExcludeThoseWhoBoughtBottlesAndCages] AS
Except
(
[customers]
,[custWhoBoughtBottlesAndCages]
)
SELECT
NON EMPTY
[Product].[Subcategory].[Subcategory] ON 0
,[custExcludeThoseWhoBoughtBottlesAndCages] ON 1
FROM [Adventure Works]
WHERE
[Measures].[Internet Sales Amount];
我有一个模型,其中包含一个度量组,其中一行表示特定 "Action" 的每个联系 "Person"。
现在我想让我的维度 "Action" 表现如下: 我 select 一个 "Action" 只有所有 "Persons" 联系的人可能会显示在该特定操作中不存在。
即使 "Person" 存在于 selected "action" 和另一个 "action" 中,"Person" 也可能不会显示。
这是您可以使用的潜在模式。第 3 组排除所有购买 [Bottles and Cages]
的客户,然后用于后续查询。
WITH
SET [customers] AS
{
[Customer].[Customer].&[15568]
,[Customer].[Customer].&[12067]
,[Customer].[Customer].&[21414]
,[Customer].[Customer].&[18695]
}
SET [custWhoBoughtBottlesAndCages] AS
NonEmpty
(
[customers]
,[Product].[Product Categories].[Subcategory].[Bottles and Cages]
)
SET [custExcludeThoseWhoBoughtBottlesAndCages] AS
Except
(
[customers]
,[custWhoBoughtBottlesAndCages]
)
SELECT
NON EMPTY
[Product].[Subcategory].[Subcategory] ON 0
,[custExcludeThoseWhoBoughtBottlesAndCages] ON 1
FROM [Adventure Works]
WHERE
[Measures].[Internet Sales Amount];