父子维度转化为组
with
member [T1] as ANCESTOR([DAccount].[Parent].currentmember,[DAccount].[Parent].[Level 02]).name
member [T2] as ANCESTOR([DAccount].[Parent].currentmember,[DAccount].[Parent].[Level 03]).name
member [T3] as ANCESTOR([DAccount].[Parent].currentmember,[DAccount].[Parent].[Level 04]).name
member [T4] as ANCESTOR([DAccount].[Parent].currentmember,[DAccount].[Parent].[Level 05]).name
member [T5] as ANCESTOR([DAccount].[Parent].currentmember,[DAccount].[Parent].[Level 06]).name
member [T6] as ANCESTOR([Time].[YM].currentmember,[Time].[YM].[Y]).name
member [T7] as ANCESTOR([Time].[YM].currentmember,[Time].[YM].[M]).name
select
{T1,T2,T3,T4,T5,T6,T7,[Measures].[DAmount]} on 0
,{filter(filter(filter(filter([DAccount].[Parent].members,ANCESTOR([DAccount].[Parent].currentmember,[DAccount].[Parent].[Level 02]).name="损益" and IsLeaf([DAccount].[Parent].currentmember)<>0),[Measures].[DAmount]<>0)*[Adminexp].[Adminexp].children,[Measures].[DAmount]<>0)*[Salesfee].[Salesfee].children,[Measures].[DAmount]<>0)*[Time].[YM].members} on 1
from [XXX]