我正在尝试从包含省份和州的维度[发货到州]中排除未知。
第一个表达式抛出省份和州,我不知道为什么 -
此mdx仅列出状态(不包括未知,并且由于某种原因,省份):
WITH
MEMBER measures.ParameterCaption as [Ship To].[Ship To State].currentmember.member_caption
MEMBER measures.ParameterValue as [Ship To].[Ship To State].currentmember.uniquename
SELECT {measures.ParameterCaption, measures.ParameterValue} ON COLUMNS,
FILTER([Ship To].[Ship To State].children,
[Ship To].[Ship To State].currentmember<>[Ship To].[Ship To State].&[Unknown]
) ON ROWS
FROM [Invoiced Orders]
此mdx正确列出州和省,并排除未知:
WITH
MEMBER measures.ParameterCaption as [Ship To].[Ship To State].currentmember.member_caption
MEMBER measures.ParameterValue as [Ship To].[Ship To State].currentmember.uniquename
SELECT {measures.ParameterCaption, measures.ParameterValue} ON COLUMNS,
FILTER([Ship To].[Ship To State].children,
measures.ParameterCaption <> "Unknown"
) ON ROWS
FROM [Invoiced Orders]
答案 0 :(得分:2)
如果您的比较是已知成员(或成员集),例如您的示例,则可以使用Except()
函数直接将其从集合中删除。
Except(
[Ship To].[Ship To State].children,
{[Ship To].[Ship To State].&[Unknown]}
)