0

这是我的查询。我想显示今年第 12 周到第 24 周的数据以及去年第 12 周到第 24 周的数据。但即使我有“prevMember”,这两年的数据也一样。你可以帮帮我吗?

WITH MEMBER [Measures].[Net Sales This Year] AS ([Measures].[Ticket Net Sales],[Date].[Fiscal].[Fiscal Year].currentmember.prevmember)  

SELECT {[Measures].[Ticket Net Sales],[Measures].[Net Sales Last Year]} on 0,

NON EMPTY {([Concepts].[Concept Name].[Concept Name],[Locations].[Department Name].[Department Name],
            [Date].[Fiscal].[Fiscal Year].Members,[Date].[Week Of Year].&[12]:[Date].[Week Of Year].&[24])} on 1

FROM spbi
4

2 回答 2

1

您可以使用该PARALLELPERIOD()功能来实现这一点。

请参阅http://technet.microsoft.com/en-us/library/ms145500

于 2012-07-10T23:13:56.557 回答
0

你可以试试这个查询:

WITH MEMBER [Measures].[Net Sales This Year] AS ([Measures].[Ticket Net Sales],[Date].[Fiscal].CurrentMember.PrevMember)  

SELECT {[Measures].[Ticket Net Sales],[Measures].[Net Sales Last Year]} ON 0,

NON EMPTY [Date].[Fiscal].[Fiscal Year].Members * [Date].[Week Of Year].&[12]:[Date].[Week Of Year].&[24]) ON 1

FROM spbi
于 2012-07-10T21:12:08.630 回答