我遇到了这个问题。我们有一个MDX,需要更新以汇总从当月开始的过去六个月的报告,因此MDX返回过去六个月的汇总数据。
我不是MDX专家,有人可以帮助,如何实现这一目标?
IDEA :我想过滤过去六个月的报道,但我不明白这是如何在语法上实现的。
MEMBER [TIME].[_TIME1] AS 'Aggregate({ [TIME].&[201401].lag(5):[TIME].&[201401] })'
实际MDX查询:
with
set [reports] as 'Filter(
[Report].[Report].Members,
Int([Measures].[Report Month Id]) = Int(([Measures].[Time Id], [TIME].&[201401] )) and
Int([Measures].[Report Root Index Id]) = Int(([Measures]. [Index Id], [INDEX_1].[All].&[1]))
)'
set [Indexes] as 'Descendants([INDEX_1].[All].&[1])'
member [Measures].[N] as 'iif(Cstr([Measures].[Index Type Name]) = "Choice Index", ([Measures].[Direct Response Count]), ([Measures].[Direct Case Count]))'
member [Measures].[Score] as '([Measures].[Direct Score])'
member [Measures].[Item Id] as 'iif(isEmpty([Measures].[N]), null, [Measures].[Index Id])'
member [Measures].[Item Code] as 'iif(isEmpty([Measures].[N]), null, [Measures].[Index Code])'
member [Measures].[Org Id] as 'iif(isEmpty([Measures].[N]), null, [Measures].[Report Organisation Id] )'
select
non empty crossjoin ( [reports] , [indexes] ) on rows ,
{
[Measures].[Org Id], [Measures].[Item Id], [Measures].[Item Code], [Measures].[N], [Measures].[Score]
} on columns
from [REPORT_SCORE]
where
(
[ORGANISATION].&[3196]
)
答案 0 :(得分:0)
你有没有要求这样的东西?:
Figure fig = new //Circle()/Triangle()/Rectangle();
if( fig instanceof Circle) {
((Circle) fig).getRadius(); //This method is only available in Circle class
}