MDX语法中,crossjoin({集合1},{[维度名称].[..]})的含义
维度名称][..]表示当前维度不参与计算 ,相当于只有集合1,没有维度名称].[..]这个集合
这种用法主要用在如果同一个columns里面有多个crossjoin,第一个不需要多维计算 ,即上面的情形 但是第二个crossjoin要做多维计算的情形中
With
member [贷款状态].[正常贷款余额] as '[贷款状态].[所有 贷款状态].[正常]',solve_order =1
member [贷款状态].[逾期余额] as '[贷款状态].[所有 贷款状态].[逾期]',solve_order =1
member [贷款状态].[呆滞余额] as '[贷款状态].[所有 贷款状态].[呆滞]',solve_order =1
member [贷款状态].[呆帐余额] as '[贷款状态].[所有 贷款状态].[呆帐]',solve_order =1
member [贷款状态].[不良贷款余额] as '[贷款状态].[所有 贷款状态].[逾期]+[贷款状态].[所有 贷款状态].[呆滞]+[贷款状态].[所有 贷款状态].[呆帐]',solve_order =2
member [贷款状态].[正常逾期] as '[贷款状态].[所有 贷款状态].[正常]+ [贷款状态].[所有 贷款状态].[逾期]',solve_order =1
member [贷款状态].[不良] as '[贷款状态].[所有 贷款状态].[逾期]+[贷款状态].[所有 贷款状态].[呆滞]+[贷款状态].[所有 贷款状态].[呆帐]',solve_order =2,format = '#,#0.00'
member [Measures].[本期户数] as '(ClosingPeriod([日期].[日],[日期].CurrentMember), [Measures].[客户数])',solve_order =1,format = '#,#0'
member [Measures].[上期余额] as 'iif([日期].CurrentMember.Level.name="日",(ClosingPeriod([日期].[日],ParallelPeriod([日期].[月],1,[日期].CurrentMember)), [Measures].[I_余额])/10000,(ClosingPeriod([日期].[日],[日期].CurrentMember.prevmember), [Measures].[I_余额])/10000)',solve_order =1,format = '#,#0'
member [Measures].[发放] as '(ClosingPeriod([日期].[日],[日期].CurrentMember), [Measures].[I_放款])/10000',solve_order =1,format = '#,#0.00'
member [Measures].[本月发放] as '([放款标志].[所有 放款标志].[所有发放贷款].[本年发放贷款].[本月发放贷款],[Measures].[发放])',solve_order =2,format = '#,#0.00'
member [Measures].[收回] as '(ClosingPeriod([日期].[日],[日期].CurrentMember), [Measures].[I_还款金额])/10000',solve_order =1,format = '#,#0.00'
member [Measures].[本月收回] as 'sum(mtd(),[Measures].[收回])',solve_order =2,format = '#,#0.00'
member [Measures].[收回不良] as '([贷款状态].[不良],[Measures].[本月收回])',solve_order =3,format = '#,#0.00'
member [Measures].[月末余额] as '(ClosingPeriod([日期].[日],[日期].CurrentMember), [Measures].[I_余额])/10000',solve_order =1,format = '#,#0.00'
member [Measures].[正常余额] as '([Measures].[月末余额],[贷款状态].[正常贷款余额])',solve_order =3,format = '#,#0.00'
member [Measures].[不良余额] as '([Measures].[月末余额],[贷款状态].[不良贷款余额])',solve_order =3,format = '#,#0'
member [科目].[贷 款] as '[科目].&[1] - [科目].&[9]',solve_order =1,format = '#,#0'
member [科目].[贴 现] as '([科目].&[9])',solve_order =1,format = '#,#0'
member [科目].[合 计] as '[科目].&[1]',solve_order =1,format = '#,#0'
member [逾期天数].[..] as '[逾期天数].[所有 逾期天数]',solve_order =1,format = '#,#0'
member [Measures].[贷款余额分布] as '([Measures].[月末余额],[贷款状态].[正常逾期])',solve_order =1,format = '#,#0.00'
member [逾期天数].[正常] as '[逾期天数].[所有 逾期天数]-[逾期天数].[所有 逾期天数].[90天以内]-[逾期天数].[所有 逾期天数].[90到180天]-[逾期天数].[所有 逾期天数].[180到270天]-[逾期天数].[所有 逾期天数].[270到360天]-[逾期天数].[所有 逾期天数].[360天以上]'
//member [逾期天数].[正常] as '[逾期天数].[所有 逾期天数].[未逾期]+ [逾期天数].[所有 逾期天数].[一年内到期]+ [逾期天数].[所有 逾期天数].[三年内到期]+ [逾期天数].[所有 逾期天//数].[三年以上到期]',solve_order =1,format = '#,#0'
Select non empty {Crossjoin({[科目].[贷 款],[科目].[贴现]},{[全行客户经理].[所有 全行客户经理].children,[全行客户经理].[所有 全行客户经理]}),([科目].[合 计],[全行客户经理].[所有 全行客户经理])} on rows,
{[Measures].[本期户数],[Measures].[上期余额],[Measures].[本月发放],[Measures].[本月收回],[Measures].[月末余额],Crossjoin({[Measures].[贷款余额分布]},{[逾期天数].[正常],[逾期天数].[所有 逾期天数].[90天以内],[逾期天数].[所有 逾期天数].[90到180天],[逾期天数].[所有 逾期天数].[180到270天],[逾期天数].[所有 逾期天数].[270到360天],[逾期天数].[所有 逾期天数].[360天以上]})} on columns
From [信贷财务信息分析]
Where ([日期].[所有 日期].[2005年].[2季度],[余额状况].[所有 余额状况].[余额不为0],[营业网点].&[0001])