MDX过滤器”条件不工作

发布于 2024-12-24 02:19:56 字数 963 浏览 4 评论 0原文

现在我的问题是 MDX 查询中的过滤条件。我使用的 MDX 查询如下所示。

SELECT
NON EMPTY { [Channel].[Grand Total],
            [Channel].[Grand Total].Children } ON COLUMNS,
NON EMPTY { [Offer].[Grand Total],
            [Offer].[Grand Total].Children } ON ROWS 
FROM
  [SCMAircelCube]
WHERE
( [Measures].[TotalCount], 
  [BasicCause].[Subscriber activated successfully] ,
  [SubscriberProfile].[Active], 
  [Circle].[ASSAM])

此查询的问题是,这显示以“AOL”开头的报价。实际上我不想在报告中显示该报价。所以我我正在尝试使用 FILTER 条件。但它也不起作用。我收到错误。任何人都可以帮助我 我想在 ROWS 上使用过滤条件。我使用以下 MDX 进行过滤。但错误正在得到

SELECT
NON EMPTY { [Channel].[Grand Total],
            [Channel].[Grand Total].Children } ON COLUMNS,
FILTER( { [Offer].[Grand Total],
          [Offer].[Grand Total].Children !=[AOL]} ) ON ROWS
FROM
  [SCMAircelCube]
WHERE
( [Measures].[TotalCount], 
  [BasicCause].[Subscriber activated successfully] , 
  [SubscriberProfile].[Active], 
  [Circle].[ASSAM])

感谢和问候 请帮助我

Now my problem is Filter condition in MDX query.The MDX query used by me is shown below

SELECT
NON EMPTY { [Channel].[Grand Total],
            [Channel].[Grand Total].Children } ON COLUMNS,
NON EMPTY { [Offer].[Grand Total],
            [Offer].[Grand Total].Children } ON ROWS 
FROM
  [SCMAircelCube]
WHERE
( [Measures].[TotalCount], 
  [BasicCause].[Subscriber activated successfully] ,
  [SubscriberProfile].[Active], 
  [Circle].[ASSAM])

Problem with this query is ,this is showing offers starting with ''AOL" .Actually i dont want to show that offer in the report.So i am trying to use the FILTER condition.But it is not working too.I am getting error.Can anyone help me
i want to use filter condition on ROWS.I used the following MDX for filtering.But error is getting

SELECT
NON EMPTY { [Channel].[Grand Total],
            [Channel].[Grand Total].Children } ON COLUMNS,
FILTER( { [Offer].[Grand Total],
          [Offer].[Grand Total].Children !=[AOL]} ) ON ROWS
FROM
  [SCMAircelCube]
WHERE
( [Measures].[TotalCount], 
  [BasicCause].[Subscriber activated successfully] , 
  [SubscriberProfile].[Active], 
  [Circle].[ASSAM])

Thanks and Regards
plshelpmep

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

清旖 2024-12-31 02:19:56

您的 filter mdx function 是否最有可能导致该问题,您可以吗尝试使用类似的内容:

FILTER( { [Offer].[Grand Total],[Offer].[Grand Total].Children}, 
        [Offer].[Grand Total].currentmember is not [Offer].[Grand Total].[AOL] )

作为对您评论和修复括号问题的回答:

SELECT 
 { [Channel].[Grand Total], [Channel].[Grand Total].Children } ON COLUMNS, 
 FILTER ( {[Offer].[Grand Total], [Offer].[Grand Total].Children }, 
   not([Offer].[Grand Total].currentmember is [Offer].[Grand Total].[AJOKED]) ) ON ROWS
FROM [SCMAircelCube] 
WHERE ( [Measures].[TotalCount], [Time].[2012].[1], [BasicCause].[Subscriber activated successfully], [ContentCategory].[SMS], [SubscriberProfile].[Active], [Circle].[KARNATAKA])

Is your filter mdx function which is most probably causing the issue, can you try with something like :

FILTER( { [Offer].[Grand Total],[Offer].[Grand Total].Children}, 
        [Offer].[Grand Total].currentmember is not [Offer].[Grand Total].[AOL] )

As an answer to you comment and fixing brackets issues :

SELECT 
 { [Channel].[Grand Total], [Channel].[Grand Total].Children } ON COLUMNS, 
 FILTER ( {[Offer].[Grand Total], [Offer].[Grand Total].Children }, 
   not([Offer].[Grand Total].currentmember is [Offer].[Grand Total].[AJOKED]) ) ON ROWS
FROM [SCMAircelCube] 
WHERE ( [Measures].[TotalCount], [Time].[2012].[1], [BasicCause].[Subscriber activated successfully], [ContentCategory].[SMS], [SubscriberProfile].[Active], [Circle].[KARNATAKA])
给妤﹃绝世温柔 2024-12-31 02:19:56

您可以使用 EXCEPT 函数:

SELECT
NON EMPTY { [Channel].[Grand Total],
            [Channel].[Grand Total].Children } ON COLUMNS,
 { [Offer].[Grand Total], EXCEPT({[Offer].[Grand Total].Children}, {[Offer].[Grand Total].[AOL]})}  ON ROWS
FROM
  [SCMAircelCube]
WHERE
( [Measures].[TotalCount], 
  [BasicCause].[Subscriber activated successfully] , 
  [SubscriberProfile].[Active], 
  [Circle].[ASSAM])

You could use the EXCEPT function:

SELECT
NON EMPTY { [Channel].[Grand Total],
            [Channel].[Grand Total].Children } ON COLUMNS,
 { [Offer].[Grand Total], EXCEPT({[Offer].[Grand Total].Children}, {[Offer].[Grand Total].[AOL]})}  ON ROWS
FROM
  [SCMAircelCube]
WHERE
( [Measures].[TotalCount], 
  [BasicCause].[Subscriber activated successfully] , 
  [SubscriberProfile].[Active], 
  [Circle].[ASSAM])
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文