MDX中union的使用
WITH
MEMBER [D_Acct_II].[PID].&[50].[毛利润] AS [D_Acct_II].[PID].&[501]-[D_Acct_II].[PID].&[502]
MEMBER [D_Acct_II].[PID].&[50].[净利润] AS
[D_Acct_II].[PID].&[501]
-[D_Acct_II].[PID].&[502]
-[D_Acct_II].[PID].&[503]
-[D_Acct_II].[PID].&[504]
-[D_Acct_II].[PID].&[511]
-[D_Acct_II].[PID].&[512]
+[D_Acct_II].[PID].&[521]
+[D_Acct_II].[PID].&[525]
+[D_Acct_II].[PID].&[531]
-[D_Acct_II].[PID].&[532]
-[D_Acct_II].[PID].&[550]
+[D_Acct_II].[PID].&[560]
SELECT
NON EMPTY { [Measures].[借方],T5 } ON COLUMNS
,NON EMPTY {
union (
[D_Acct_II].[PID].&[501]
,[D_Acct_II].[PID].&[50].[毛利润]
,[D_Acct_II].[PID].&[50].[净利润]
,[D_Acct_II].[PID].&[50].[毛利率]
,[D_Acct_II].[PID].&[50].[净利率]
,all
)
} ON ROWS
from [xxx]