这两个是最近写的觉得比较有用的mdx语句,呵呵,贴出来,有用的着就用吧!
1。查询江苏省06年1月1号至06年5月15号的A接口话务量:
select {[measures].[交换机A接口话务量]}on columns,{[MSC维].[省份].&[江苏]} on rows from [Data Analysis] where([时间维].[日].&[2006年01月01日]:[时间维].[日].&[2006年05月15日])
2。 查询江苏省的本月(06年10月)和上月的A接口话务量,及10月和9月的差值及增长率:
with member [Measures].[上月同期] as '(PARALLELPERIOD( [时间维].[月层次].[月], 1 , [时间维].[月层次].[年].&[2006年].&[2006年10月] ),[Measures].[A接口话务量])' member [Measures].[本月]as '([时间维].[月].&[2006年10月],[Measures].[A接口话务量])' member [Measures].[差值] as '([Measures].[A接口话务量]-[Measures].[上月同期])' member[Measures].[比率] as '(([Measures].[A接口话务量]-[Measures].[上月同期]))/[Measures].[上月同期]' select {[Measures].[本月], [Measures].[上月同期],[Measures].[差值],[Measures].[比率]} on columns, {[地理维].[地理层次].[省份].&[江苏省]} on rows from [C网无线与交换专题]
1。查询江苏省06年1月1号至06年5月15号的A接口话务量:
select {[measures].[交换机A接口话务量]}on columns,{[MSC维].[省份].&[江苏]} on rows from [Data Analysis] where([时间维].[日].&[2006年01月01日]:[时间维].[日].&[2006年05月15日])
2。 查询江苏省的本月(06年10月)和上月的A接口话务量,及10月和9月的差值及增长率:
with member [Measures].[上月同期] as '(PARALLELPERIOD( [时间维].[月层次].[月], 1 , [时间维].[月层次].[年].&[2006年].&[2006年10月] ),[Measures].[A接口话务量])' member [Measures].[本月]as '([时间维].[月].&[2006年10月],[Measures].[A接口话务量])' member [Measures].[差值] as '([Measures].[A接口话务量]-[Measures].[上月同期])' member[Measures].[比率] as '(([Measures].[A接口话务量]-[Measures].[上月同期]))/[Measures].[上月同期]' select {[Measures].[本月], [Measures].[上月同期],[Measures].[差值],[Measures].[比率]} on columns, {[地理维].[地理层次].[省份].&[江苏省]} on rows from [C网无线与交换专题]
浙公网安备 33010602011771号