我有以下要求:
有基金维度和日期维度和买入价格衡量标准。我只用三天即今天,7天后和昨天显示基金代码,基金系列,行中基金名称和投标价格。这些天我已经计算好了。如何在行上显示日期并仅获取那些日期的数据?
WITH
MEMBER [DateTest].[Today] As
FORMAT (Now(),'yyyy-MM-dd')
MEMBER [DateTest].[Yesterday] As
FORMAT (Now()-1,'yyyy-MM-dd')
MEMBER [DateTest].[LastWeek] As
FORMAT (Now()-7,'yyyy-MM-dd')
SELECT NON EMPTY { [Measures].[Fund Bid Price 6dp - Fund Ccy] } ON COLUMNS,
NON EMPTY { (
Except([Fund].[Fund Code].[Fund Code].ALLMEMBERS,
filter([Fund].[Fund Code].[Fund Code].ALLMEMBERS ,
(left( [Fund].[Fund Code].currentmember.name,1)="P"
OR left( [Fund].[Fund Code].currentmember.name,1)="Q"
OR left( [Fund].[Fund Code].currentmember.name,1)="W"
)
)
) --Excluding fund code which are starting with 'P','Q' or 'W'
*EXCEPT([Share Class].[Series Number].Children, [Share Class].[Series Number].&[11] ) --Excluding "X"
* [Fund].[Fund Name].[Fund Name].ALLMEMBERS
* [Fund].[Fund Type].[Fund Type].ALLMEMBERS
//* {[Business Date].[Year].&[2012],[Business Date].[Year].&[2014]}
//* ([Business Date].[Date].[Date].ALLMEMBERS )
)
} ON ROWS
FROM
(SELECT
([Business Date].[Year].&[1998] : [Business Date].[Year].&[2014] ) ON COLUMNS
FROM [IDM Investment Data] )
![enter image description here][1]