累积和的计算成员

发布于 2024-08-11 05:12:15 字数 494 浏览 3 评论 0原文

首先是一些背景知识:我有典型的日期维度(类似于 Adventure Works 多维数据集中的维度)和帐户维度。在我的事实表中,我有帐户的每日交易金额。

我需要计算不同时间段内不同账户的累计交易金额。问题是,无论结果报告中显示的第一个期间是什么,都应从事实表中按原样获取其交易金额,并且报告中的所有后续期间都应具有累积金额。

例如,我可能在行和列上有一个帐户,我可以有 [日期].[日历].[日历年].[&2005]:[日期].[日历].[日历年].[ &2010]。 2005 年的交易金额应为该特定帐户 2005 年发生的交易金额的总和。对于下一年(2006 年),交易金额应为 TransactionAmountsIn2005 + TransactionAmountsIn2006。剩下的几年也是如此。

我的问题是,我真的不知道如何在多维数据集中指定这种计算成员,因为负责编写生成报告的实际 MDX 查询的最终用户可以在任何层次结构级别上使用任何范围的周期。日期维度。

希望这是有道理的。

First some background: I have the typical Date dimension (similar to the one in the Adventure Works cube) and an Account dimension. In my fact table I have daily transaction amounts for the accounts.

I need to calculate cumulative transaction amounts for different accounts for different periods of time. The catch is that whatever is the first period shown on the resulting report should get its transaction amount as-is from the fact table and all the following periods in the report should have cumulative amounts.

For example, I might have a single account on rows and on columns I could have [Date].[Calendar].[Calendar Year].[&2005]:[Date].[Calendar].[Calendar Year].[&2010]. The transaction amount for 2005 should have the sum of transaction amounts that took place in 2005 for that specific account. For the following year, 2006, the transaction amount should be TransactionAmountsIn2005 + TransactionAmountsIn2006. Same goes for the remaining of the years.

My problem is that I don't really know how to specify this kind of calculated member in the cube because the end-user who is responsible for writing the actual MDX queries that produce the reports could use any range of periods on any hierarchy level of the Date dimension.

Hope this made some sense.

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

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

发布评论

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

评论(1

总攻大人 2024-08-18 05:12:15

Teeri,

我会避免让最终用户实际编写 MDX 查询,而只是强制他们使用您定义的范围。为了澄清这一点,只需给他们一个开始和结束日期,或者一个范围(如果您愿意的话),以进行选择,然后从那里开始。我多年来一直与会计和财务部门一起开发多维数据集(总账等),这通常是他们最终想要的。

祝你好运!

Teeri,

I would avoid letting the end-user actually write MDX queries and just force them to use ranges you defined. To clarify, just give them a start and end date, or a range if you will, to select and then go from there. I've worked with accounting and finance developing cubes (General Ledger, etc) for years and this is usually what they were ultimately looking for.

Good luck!

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