MDX 过滤数据
MDX filter data
WITH
MEMBER [Measures].[ParameterCaption] AS [Estate].[Week].CURRENTMEMBER.MEMBER_CAPTION
MEMBER [Measures].[ParameterValue] AS [Estate].[Week].CURRENTMEMBER.UNIQUENAME
MEMBER [Measures].[ParameterLevel] AS [Estate].[Week].CURRENTMEMBER.LEVEL.ORDINAL
SELECT
{[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS
,
NON EMPTY (
ORDER (
EXCEPT( [Estate].[Week].[ALL].CHILDREN
, { [Estate].[Week]})
, ( [Estate].[Week].MEMBERVALUE)
, ASC
)
) ON ROWS
From [EstateRpt]
WHERE Filter([V Estate Weekly Rpt].[Week].CHILDREN, [V Estate Weekly Rpt].[Week].MEMBERVALUE = 'NONE')
嗨,我是 MDX 的新手。我想过滤不等于 "NONE" 的星期?默认情况下,week 设置为 "NONE",因此它会在 cube 中显示 NONE 数据。我想过滤这个 NONE.
我确实尝试了 WHERE 子句,但它向我显示了错误,我不知道是什么问题
如果你想过滤掉 'NONE'
那么你需要在你的过滤器中使用这个:
<> 'NONE'
您还需要在您的过滤器中使用 CurrentMember,就像这个例子:
SELECT
{
[Date].[Calendar].[Month].&[2006]&[7]
,[Date].[Calendar].[Date].&[20050220]
}
*
{[Measures].[Reseller Sales Amount]} ON COLUMNS
,
{[Product].[Category].Children}
*
{[Geography].[Geography].[Country].MEMBERS} ON ROWS
FROM [Adventure Works]
WHERE
Filter
(
[Geography].[State-Province].MEMBERS
,
[Geography].[State-Province].CurrentMember.Member_Caption <> 'California'
);
WITH
MEMBER [Measures].[ParameterCaption] AS [Estate].[Week].CURRENTMEMBER.MEMBER_CAPTION
MEMBER [Measures].[ParameterValue] AS [Estate].[Week].CURRENTMEMBER.UNIQUENAME
MEMBER [Measures].[ParameterLevel] AS [Estate].[Week].CURRENTMEMBER.LEVEL.ORDINAL
SELECT
{[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS
,
NON EMPTY (
ORDER (
EXCEPT( [Estate].[Week].[ALL].CHILDREN
, { [Estate].[Week]})
, ( [Estate].[Week].MEMBERVALUE)
, ASC
)
) ON ROWS
From [EstateRpt]
WHERE Filter([V Estate Weekly Rpt].[Week].CHILDREN, [V Estate Weekly Rpt].[Week].MEMBERVALUE = 'NONE')
嗨,我是 MDX 的新手。我想过滤不等于 "NONE" 的星期?默认情况下,week 设置为 "NONE",因此它会在 cube 中显示 NONE 数据。我想过滤这个 NONE.
我确实尝试了 WHERE 子句,但它向我显示了错误,我不知道是什么问题
如果你想过滤掉 'NONE'
那么你需要在你的过滤器中使用这个:
<> 'NONE'
您还需要在您的过滤器中使用 CurrentMember,就像这个例子:
SELECT
{
[Date].[Calendar].[Month].&[2006]&[7]
,[Date].[Calendar].[Date].&[20050220]
}
*
{[Measures].[Reseller Sales Amount]} ON COLUMNS
,
{[Product].[Category].Children}
*
{[Geography].[Geography].[Country].MEMBERS} ON ROWS
FROM [Adventure Works]
WHERE
Filter
(
[Geography].[State-Province].MEMBERS
,
[Geography].[State-Province].CurrentMember.Member_Caption <> 'California'
);