随时间推移的MDX计数(年份-一年之内) [英] MDX Count over time (years - not within a year)

查看:78
本文介绍了随时间推移的MDX计数(年份-一年之内)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够累积多年来对产品的承诺数量-

I'd like to be able to rollup the count of commitments to a product over years -

每年的新承诺数据如下:

The data for new commitments in each year looks like this:

Year    | Count of new commitments | (What I'd like - count of new commitments to date)  
1986    4        4  
1987    22       26  
1988    14       40  
1989    1        41  

我知道您可以在一年之内完成本年至今,本月为止的其他工作,但是我需要做很多年.

I know that within a year you can do year to date, month to date etc, but I need to do it over multiple years.

为我提供前两列的mdx很简单(但我不知道从这里开始要走什么路):

the mdx that gives me the first 2 columns is (really simple - but I don't know where to go from here):

select [Measures].[Commitment Count] on 0
, [Date Dim].[CY Hierarchy].[Calendar Year] on 1
from [Cube]

任何帮助都会很棒

推荐答案

在MDX中,大致情况如下:

In MDX something along the line:

with member [x] as sum( 
    [Date Dim].[CY Hierarchy].[Calendar Year].members(0) : [Date Dim].[CY Hierarchy].currentMember,
    [Measures].[Commitment Count] 
)

select [x] on 0, [Date Dim].[CY Hierarchy].[Calendar Year] on 1 from [Cube]

这篇关于随时间推移的MDX计数(年份-一年之内)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆