搜索月份功能

时间:2019-08-01 07:15:02

标签: sql tableau mdx

我在Tableau中有一个项目,我想在过滤器“ Fiscal Time Hierarchy”中标记每月的天数。 例如,我在过滤器2019.07上标记为我的结果为31,而当同时标记为2019.06(+2019.07)时,我希望结果为61。

我的Tableau已连接到服务器,因此我无法将尺寸更改为度量。我必须有一个MDX查询-在表格“计算所得的成员”中

今天,我准备了一些代码,但是当我在过滤器上标记超过一次时,出现了错误。正在工作一个月或一年,但没有工作两个月,两年。

https://imgur.com/F1EoPaD

我的mdx:

   count( descendants([Time].[Fiscal Time Hierarchy].CurrentMember, 3))

过滤结果2019.07-> 31是正确的
筛选结果2019.07 + 2019.06->

错误

错误文本两次: 与数据源“模型(Ariadne)”通信时发生错误。

  

错误代码:A7AED4D2
  数据库错误0x80004005:
  由于“会计年度”属性的坐标包含一个集合,因此MDX CURRENTMEMBER函数无法执行。

Technical details:

    RootActivityId: 251a2e39-6466-46d3-bec0-c5e305c186eb
    Data (UTC): 8/1/2019 7:10:12 AM
      ; The query: WITH
    MEMBER [Measures].[daycount] AS
      'count( descendants([Time].[Fiscal Time Hierarchy], 3))',
      SOLVE_ORDER = 0, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_556757519052849152] AS
      '([Measures].[Trans Revenue Nett (LC)] - [Measures].[Revenue BDG 2020 before ADJ (LC)])',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_995295533060087809] AS
      'IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_591378942957641731] AS
      '[Measures].[Trans Revenue Nett (LC)]',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_591378942953566209] AS
      '(1 - ([Measures].[Revenue BDG 2020 before ADJ (LC)] / (([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW()))))))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_322851815536898052] AS
      '(1 - ([Measures].[Revenue FC1 2020 before ADJ (LC)] / (([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW()))))))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_322851815528308738] AS
      '(1 - ([Measures].[Revenue FC1 2020 before ADJ (LC)] / [Measures].[Trans Revenue Nett (LC)]))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_322851815536275459] AS
      '((([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))))) - [Measures].[Revenue FC1 2020 before ADJ (LC)])',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_995295533059760128] AS
      'IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_591378943005073413] AS
      '((([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))))) - [Measures].[Trans Revenue Nett (LC)])',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_995295533060726786] AS
      '(([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW()))))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_995295533073104899] AS
      'DateValue(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW()))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_322851815528140801] AS
      '([Measures].[Trans Revenue Nett (LC)] - [Measures].[Revenue FC1 2020 before ADJ (LC)])',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_591378942953381888] AS
      '((([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))))) - [Measures].[Revenue BDG 2020 before ADJ (LC)])',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_591378942958161924] AS
      '[Measures].[Revenue BDG 2020 before ADJ (LC)]',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_556757519053275138] AS
      '(1 - ([Measures].[Revenue BDG 2020 before ADJ (LC)] / [Measures].[Trans Revenue Nett (LC)]))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_322851815527907328] AS
      '[Measures].[Revenue FC1 2020 before ADJ (LC)]',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    SELECT
    {[Measures].[daycount]} DIMENSION PROPERTIES [MEMBER_UNIQUE_NAME],[MEMBER_CAPTION] ON COLUMNS
    FROM [Model]
    WHERE
    StripCalculatedMembers(CROSSJOIN(
      Intersect(
        {[Platform - Attributes].[Declared Seller Type].&[B2C]:[Platform - Attributes].[Declared Seller Type].&[C2C]},
        AddCalculatedMembers( Except(
          [Platform - Attributes].[Declared Seller Type].Members,
          {[Platform - Attributes].[Declared Seller Type].Levels(0).Members}) )),
      CROSSJOIN(
        {[Site].[Country Hierarchy].[Country].&[Poland]},
        {[Time].[Fiscal Time Hierarchy].[Fiscal Month].&[2019-06]:[Time].[Fiscal Time Hierarchy].[Fiscal Month].&[2019-07]})))
    WITH
    MEMBER [Measures].[daycount] AS
      'count( descendants([Time].[Fiscal Time Hierarchy], 3))',
      SOLVE_ORDER = 0, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_556757519052849152] AS
      '([Measures].[Trans Revenue Nett (LC)] - [Measures].[Revenue BDG 2020 before ADJ (LC)])',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_995295533060087809] AS
      'IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_591378942957641731] AS
      '[Measures].[Trans Revenue Nett (LC)]',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_591378942953566209] AS
      '(1 - ([Measures].[Revenue BDG 2020 before ADJ (LC)] / (([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW()))))))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_322851815536898052] AS
      '(1 - ([Measures].[Revenue FC1 2020 before ADJ (LC)] / (([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW()))))))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_322851815528308738] AS
      '(1 - ([Measures].[Revenue FC1 2020 before ADJ (LC)] / [Measures].[Trans Revenue Nett (LC)]))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_322851815536275459] AS
      '((([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))))) - [Measures].[Revenue FC1 2020 before ADJ (LC)])',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_995295533059760128] AS
      'IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_591378943005073413] AS
      '((([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))))) - [Measures].[Trans Revenue Nett (LC)])',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_995295533060726786] AS
      '(([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW()))))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_995295533073104899] AS
      'DateValue(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW()))))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_322851815528140801] AS
      '([Measures].[Trans Revenue Nett (LC)] - [Measures].[Revenue FC1 2020 before ADJ (LC)])',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_591378942953381888] AS
      '((([Measures].[Trans Revenue Nett (LC)] * IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))),NULL,DAY(IIF(IsEmpty(IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))),NULL,DATEADD("d",-1,IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))),NULL,DATEADD("m",DATEDIFF("m", CDate(34700), IIF(IsEmpty(INT(NOW())),NULL,DATEADD("m",1,INT(NOW())))), CDate(34700)))))))) / IIF(IsEmpty(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))),NULL,DAY(IIF(IsEmpty(INT(NOW())),NULL,DATEADD("d",-1,INT(NOW())))))) - [Measures].[Revenue BDG 2020 before ADJ (LC)])',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_591378942958161924] AS
      '[Measures].[Revenue BDG 2020 before ADJ (LC)]',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_556757519053275138] AS
      '(1 - ([Measures].[Revenue BDG 2020 before ADJ (LC)] / [Measures].[Trans Revenue Nett (LC)]))',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    MEMBER [Measures].[Calculation_322851815527907328] AS
      '[Measures].[Revenue FC1 2020 before ADJ (LC)]',
      SOLVE_ORDER = 65535, SCOPE_ISOLATION = CUBE
    SELECT
    {[Measures].[daycount]} DIMENSION PROPERTIES [MEMBER_UNIQUE_NAME],[MEMBER_CAPTION] ON COLUMNS
    FROM [Model]
    WHERE
    StripCalculatedMembers(CROSSJOIN(
      Intersect(
        {[Platform - Attributes].[Declared Seller Type].&[B2C]:[Platform - Attributes].[Declared Seller Type].&[C2C]},
        AddCalculatedMembers( Except(
          [Platform - Attributes].[Declared Seller Type].Members,
          {[Platform - Attributes].[Declared Seller Type].Levels(0).Members}) )),
      CROSSJOIN(
        {[Site].[Country Hierarchy].[Country].&[Poland]},
        {[Time].[Fiscal Time Hierarchy].[Fiscal Month].&[2019-06]:[Time].[Fiscal Time Hierarchy].[Fiscal Month].&[2019-07]})))

0 个答案:

没有答案