MDX 计算成员

发布于 2024-08-12 04:17:26 字数 491 浏览 2 评论 0原文

我正在尝试创建需要 MDX 的 TFS 报告。我正在制作一份需要计算成员的报告。我不是 100% 确定这是如何完成的。我想做的成员是差异计算。

例如:

               Sept 1    Sept 2    Sept 3
Actual         0         32        58
Remaining      163       140       132
Difference     0         9         50

差值的计算如下: 当天的实际工作量 -(前一天剩余的工作量 - 当天剩余的工作量) 32 - (163 - 140) = 9

我已经从 SQL Server 2008 安装了商业智能开发,用于在 Visual Studio 2008 中创建 TFS 报告。当我添加新报告时,会打开一个查询生成器窗口。这是获取数据的测量和其他信息的地方。这是我尝试创建计算成员的地方。有什么建议吗??

I am trying to create a TFS report which requires MDX. I am making a report that requires a calculated member. I am not 100% sure how this is done. The member i am trying to do is a difference calculation.

For example:

Table

               Sept 1    Sept 2    Sept 3
Actual         0         32        58
Remaining      163       140       132
Difference     0         9         50

The calculation for the difference is as follows:
Actual Effort for that day - (Work remaining previous day - Work remaining that day)
32 - (163 - 140) = 9

I have installed Business Intelligence Development from SQL Server 2008 to use to create TFS Reports In Visual Studio 2008. When I add a new report a query builder window opens. This is where Measures and other information to get the data is done. This is where I am trying to create the Calculated member. Any suggestions??

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

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

发布评论

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

评论(1

稚然 2024-08-19 04:17:26

计算成员是在设计/构建多维数据集时创建的,就像度量和维度一样。如果您确实想要添加计算成员,则必须将其添加到多维数据集本身。

但是,您可以在自己的查询中创建计算成员,如下所示:

WITH 
   MEMBER [Measures].[Special Discount] AS
   [Measures].[Discount Amount] * 1.5
SELECT 
   [Measures].[Special Discount] on COLUMNS,
   NON EMPTY [Product].[Product].MEMBERS  ON Rows
FROM [Adventure Works]
WHERE [Product].[Category].[Bikes]

以下是 MSDN 文章的链接,描述了如何执行此操作:
创建查询范围的计算成员 (MDX)

Calculated members are created when designing/building the cube, just like measures and dimensions. If you really want to add the calculated member, you will have to add it to the cube itself.

You can however, created calculated memebers inside your own query, something like this:

WITH 
   MEMBER [Measures].[Special Discount] AS
   [Measures].[Discount Amount] * 1.5
SELECT 
   [Measures].[Special Discount] on COLUMNS,
   NON EMPTY [Product].[Product].MEMBERS  ON Rows
FROM [Adventure Works]
WHERE [Product].[Category].[Bikes]

Here's a link to the MSDN article that describes how to do this:
Creating Query-Scoped Calculated Members (MDX)

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