• 父子维度转化为组


    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]

  • 相关阅读:
    多线程学习
    Redis学习2
    Redis学习1
    封装
    创建对象内存分析
    稀疏数组
    反转数组、冒泡排序
    可变参数
    .net core 3.x Web Api + Docker个人练手项目
    .net 性能优化手段
  • 原文地址:https://www.cnblogs.com/chunshen/p/2568962.html
Copyright © 2020-2023  润新知