--MDX 语句写法 --已存在度量 费用A 费用B 费用C 费用D 人次A 人次B --已存在维度 科室A 科室B 科室C --求 费用A (费用A+费用B)/人次A 费用C-费用D 人次B --科室变化:科室A 科室B+C 科室A+C WITH MEMBER [DeptOrder] AS [科室].[二级科室].CURRENTMEMBER.PROPERTIES('name') MEMBER [科室].[二级科室].[科室B+C] as ([科室].[二级科室].[科室B] + [科室].[二级科室].[科室C]) MEMBER [临床科室].[二级科室].[科室A+C ] as ([科室].[二级科室].[科室A] + [科室].[二级科室].[科室C]) MEMBER [费用AB率 ] AS IIF([费用A]+[费用B]=0,NULL,[费用A]+[费用B]/[人次A]) MEMBER [费用CD ] AS ([费用C]/[费用D]) SELECT { [费用A], [费用AB率], [费用CD], [人次B ] } ON 0 , NON EMPTY Order({ [科室].[二级科室].[二级科室] - [科室].[二级科室].[科室B] - [科室].[二级科室].[科室C] , [科室].[二级科室].[科室B+C ] , [科室].[二级科室].[科室A+C ] }, [DeptOrder], ASC) ON 1 FROM [Cube_MO] WHERE ({[日期].[月].&[201903],[日期].[月].&[201902]})