日期:2014-05-18 浏览次数:20581 次
with member [Measures].[月底销售量] as ([日期].[年-月-日].parent.lastchild, [Measures].[精品销售量]) member [Measures].[月底销售量2] as ([日期].[年-月-日].FirstSibling.prevmember, [Measures].[精品销售量]) member [Measures].[月初销售量] as ([日期].[年-月-日].parent.firstchild, [Measures].[精品销售量]) member [Measures].[上月底销售量] as ([日期].[年-月-日].parent.prevmember.lastchild, [Measures].[精品销售量]) member [Measures].[上月初销售量] as ([日期].[年-月-日].parent.prevmember.firstchild, [Measures].[精品销售量]) member [Measures].[本月销售量] as sum(mtd([日期].[年-月-日]),[Measures].[精品销售量]) member [Measures].[上月销售量] as ([日期].[年-月-日].parent.prevmember,[Measures].[精品销售量]) member [Measures].[上月同期销售量1] as (PARALLELPERIOD( [日期].[年-月-日].[月], 1,[日期].[年-月-日]), [Measures].[精品销售量]) --PARALLELPERIOD表示是是同期销售量 member [Measures].[上月截止销售量] as (PARALLELPERIOD( [日期].[年-月-日].[月], 1,[日期].[年-月-日]),[Measures].[本月销售量]) member [Measures].[本年销售量] as sum(ytd([日期].[年-月-日]),[Measures].[精品销售量]) ----------- member [Measures].[上年销售量] as ([日期].[年-月-日].parent.parent.prevmember,[Measures].[精品销售量]) member [Measures].[上年同期销售量1] as (PARALLELPERIOD( [日期].[年-月-日].[年], 1,[日期].[年-月-日]), [Measures].[精品销售量]) member [Measures].[上年截止销售量] as (PARALLELPERIOD( [日期].[年-月-日].[年], 1,[日期].[年-月-日]),[Measures].[本年销售量]) select {[Measures].[精品销售量],[Measures].[月底销售量],[Measures].[月底销售量2],[Measures].[月初销售量] ,[Measures].[上月底销售量] ,[Measures].[上月初销售量],[Measures].[本月销售量],[Measures].[上月销售量] ,[Measures].[上月同期销售量1],[Measures].[上月截止销售量],[Measures].[本年销售量] ,[Measures].[上年销售量] ,[Measures].[上年同期销售量1],[Measures].[上年截止销售量] } on 0,{ [门店信息].[Shop ID].[Shop ID].allmembers } on 1 from [EquipmentKPI] where [日期].[年-月-日].[年].&[2010].&[7].&[2010-07-31T00:00:00]