MDX 查询问题

发布于 2024-11-28 15:05:46 字数 620 浏览 0 评论 0原文

我是 MDX 新手。我正在尝试执行以下结果。

Attended Client Count              Client Count

---------------------             -----------------

723                                  1223

我尝试这样做:

WITH MEMBER [Attended Client] AS
        [Measures].[Client Count]

SET [Attended Client Set] AS
FILTER
(
    [Dim Client Attendance].[Attended].&[Attended],
    [Measures].[Client Count] <>0
)

SELECT {[Measures].[Client Count],[Attended Client] } ON COLUMNS
FROM [Client Intervention]

它引发了一个错误:函数中指定的两个集合具有不同的维度。我可以一次执行[措施].[客户计数]或[出席的客户],但不能一起执行。有什么解决办法吗?谢谢

Im new to MDX . I am trying to perform the following result.

Attended Client Count              Client Count

---------------------             -----------------

723                                  1223

And I tried to do this :

WITH MEMBER [Attended Client] AS
        [Measures].[Client Count]

SET [Attended Client Set] AS
FILTER
(
    [Dim Client Attendance].[Attended].&[Attended],
    [Measures].[Client Count] <>0
)

SELECT {[Measures].[Client Count],[Attended Client] } ON COLUMNS
FROM [Client Intervention]

And it throws me an error : Two sets specified in the function have different dimensionality. I'm able to do [Measures].[Client Count] OR [Attended Client] at a time, but not together. Any solution for this??? Thanks

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

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

发布评论

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

评论(1

始终不够爱げ你 2024-12-05 15:05:46

这里有一个关于 MDX 的简单介绍的链接,您可以在其中了解寻找元组/集合。以下查询应该执行您想要的操作:

WITH MEMBER [Measures].[Attended Client Client] AS
  Aggregate( FILTER ( 
               [Dim Client Attendance].[Attended].&[Attended], 
               [Measures].[Client)Count] <>0
             ),
             [Measures].[Client Count]
  )

SELECT {[Measures].[Attended Client Client],[Measures].[Client Count] } ON COLUMNS
FROM [Client Intervention]

Here is a link about a gentle introduction to MDX where you can have a look for tuples/sets. The following query should do what you want:

WITH MEMBER [Measures].[Attended Client Client] AS
  Aggregate( FILTER ( 
               [Dim Client Attendance].[Attended].&[Attended], 
               [Measures].[Client)Count] <>0
             ),
             [Measures].[Client Count]
  )

SELECT {[Measures].[Attended Client Client],[Measures].[Client Count] } ON COLUMNS
FROM [Client Intervention]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文