代码之家  ›  专栏  ›  技术社区  ›  Stuart

有没有办法使用LINQ进行MDX查询?

  •  6
  • Stuart  · 技术社区  · 15 年前

    4 回复  |  直到 15 年前
        1
  •  4
  •   Frank Schwieterman    15 年前

        2
  •  0
  •   Joel Mueller    15 年前

    WITH SET c0 AS 'HIERARCHIZE({[Measures].[Internet Sales Amount], [Measures].[Internet Gross Profit], [Measures].[Reseller Gross Profit], [Measures].[Average Sales Amount], [Measures].[Gross Profit]})'
    SET r0_1 AS 'HIERARCHIZE(Filter(Filter({[Customer].[Customer Geography].[All Customers], AddCalculatedMembers(DESCENDANTS([Customer].[Customer Geography].[All Customers], 1))}, NOT [Customer].[Customer Geography].currentmember.parent is [Customer].[Customer Geography].[All Customers] OR vba!ucase(left([Customer].[Customer Geography].currentmember.properties("CAPTION"),1)) = "u"), NOT [Customer].[Customer Geography].currentmember.level is [Customer].[Customer Geography].[Country] OR vba!ucase(left([Customer].[Customer Geography].currentmember.properties("CAPTION"),1)) = "u"))'
    SELECT NON EMPTY {[c0]}
    ON COLUMNS, NON EMPTY VISUALTOTALS(FILTER({[r0_1]}
    ,vba!ucase(right([Customer].[Customer Geography].currentmember.properties("CAPTION"),8)) = "SUBTOTAL" OR [Measures].[Internet Gross Profit] > 80000)
    , "* SUBTOTAL") ON ROWS FROM [Adventure Works]
    CELL PROPERTIES VALUE, FORMATTED_VALUE, FORMAT_STRING, FORE_COLOR, BACK_COLOR
    
        3
  •  0
  •   Wesam    6 年前

    nugget Matt Hallmark的“PercolatorAnalysisServices”,您可以使用linq查询从多维数据集(分析服务)获取数据,并且您还可以在代码中执行完整的mdx查询,请查看此 tutorial