Is there any way to use LINQ for MDX queries?
Asked Answered
W

3

7

Anyone know if there are plans for LINQ to MDX .

Does any way currently exist to use LINQ with MDX / CUBES

Wedded answered 16/6, 2009 at 16:10 Comment(0)
P
4

The answer is definately no. If you drink the Entity Framework koolaid, you'll believe that if you start using EF now (instead of linq2sql) you'll get OLAP/BI for free down the road.

Pulse answered 16/6, 2009 at 23:4 Comment(1)
I suspected as much . Asked more in hope than anything :(Wedded
C
0

I think they'd have to add more than a few new operators and methods to LINQ before they could support even a significant subset of MDX:

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
Carvelbuilt answered 16/6, 2009 at 23:0 Comment(0)
I
0

Yes now there is thanks to this nugget "PercolatorAnalysisServices" by Matt Hallmark , you can use linq queries to fetch data from the cube (analytical services ) and you also have the ability to execute a full mdx query incode , check out this tutorial as well , very helpful

Indifferentism answered 15/5, 2018 at 14:43 Comment(1)
Does this stil work? I tried on vs 2019 today but it wouldn't generate the *.tt files that configure everything else.Springy

© 2022 - 2024 — McMap. All rights reserved.