1. 计算汇总
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
sum( ([日期].[日期].&[2016-06-01]:[日期].[日期].&[2016-06-30]) , [Measures].[零售数量] )
2. 计算单款最大销售
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
max( existing([款].[Skey].children) , [Measures].[零售数量] )
3. 统计零售款数
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
distinctcount( existing( [款].[Skey].children , [Measures].[零售数量] ) )
4. 统计销量大于10的款数
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
distinctcount( filter( existing( [款].[Skey].children ) , [Measures].[零售数量]>10 ) )
5. 统计原店增长
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
--原店增长比例 sum( filter( existing( [店铺].[Ekey].children ) , 0 <> ([日期].[日期].currentmember,[Measures].[零售数量]) and 0<> (STRTOMEMBER("[日期].[日期].&[" +format( cdate([日期].[日期].currentmember.PROPERTIES("对比日期")),"yyyy-MM-dd") +"]") ,[Measures].[零售数量]) ) ,([日期].[日期].currentmember,[Measures].[零售数量]) ) / sum( filter( existing( [店铺].[Ekey].children ) , 0 <> ([日期].[日期].currentmember,[Measures].[零售数量]) and 0<> (STRTOMEMBER("[日期].[日期].&[" +format( cdate([日期].[日期].currentmember.PROPERTIES("对比日期")),"yyyy-MM-dd") +"]") ,[Measures].[零售数量]) ) ,(STRTOMEMBER("[日期].[日期].&[" +format( cdate([日期].[日期].currentmember.PROPERTIES("对比日期")),"yyyy-MM-dd") +"]") ,[Measures].[零售数量]) ) -1
6. 下跌家数统计
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
--下跌家数 distinctcount( filter( existing( [店铺].[Ekey].children ) , 0 <> ([日期].[日期].currentmember,[Measures].[零售数量]) and 0<> (STRTOMEMBER("[日期].[日期].&[" +format( cdate([日期].[日期].currentmember.PROPERTIES("对比日期")),"yyyy-MM-dd") +"]") ,[Measures].[零售数量]) and ([日期].[日期].currentmember,[Measures].[零售数量]) < (STRTOMEMBER("[日期].[日期].&[" +format( cdate([日期].[日期].currentmember.PROPERTIES("对比日期")),"yyyy-MM-dd") +"]") ,[Measures].[零售数量]) ) )
7. 断码计算
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
--收货尺码个数 distinctcount( filter( [SKC].[Skc].currentmember*[尺码].[尺码ID].children , [Measures].[累计客户收货数量]>0) ) --库存尺码个数 distinctcount( filter( [SKC].[Skc].currentmember*[尺码].[Zkey].children , [Measures].[店铺最新库存数量]>0) ) --断码SKC个数 distinctcount( filter( existing([SKC].[Skc].children) , measures.[收货尺码个数] -measures.[库存尺码个数] <> 0 ) )
8. 指定成员
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
with member [日期].[年月].[16年2-3月] as [日期].[年月].&[201602] +[日期].[年月].&[201603] select [Measures].[零售数量] on 0 , {[日期].[年月].&[201602],[日期].[年月].[16年2-3月] } on 1 from [商品管家]