'how to use mdx query in excel
I write one mdx query for my olap cube .This query is doing abc analysis.But I want to use in excel for creating table and graphs.But I dont know how can I use this mdx query? I try in power bi ,it is working fine but in excel I didnt.please I need help.Thanks
My MDX Query :
WITH
MEMBER [Measures].[Measure for ABC] AS
[Measures].[Profit]
SET [Set for ABC] AS
NonEmpty( [Items].[Item Description].[Item Description].MEMBERS,
[Measures].[Measure for ABC] )
SET [A] AS
TopPercent( [Set for ABC], 30, [Measures].[Measure for ABC] )
SET [B] AS
TopPercent( [Set for ABC], 80, [Measures].[Measure for ABC] ) -
[A]
SET [C] AS
[Set for ABC] - [A] - [B]
MEMBER [Measures].[ABC Group] AS
iif( IsEmpty( [Measures].[Measure for ABC] ), null,
iif( Intersect( [A],
[Items].[Item Description].CurrentMember
).Count > 0,
'A',
iif( Intersect( [B],
[Items].[Item Description].CurrentMember
).Count > 0,
'B',
'C' ) ) )
SELECT
{ [Measures].[Measure for ABC],
[Measures].[ABC Group] } ON 0,
NON EMPTY
{ [Items].[Item Description].[Item Description].MEMBERS } ON 1
FROM
[PrxSaleCube]
Power BI:
Solution 1:[1]
If you start a PivotTable against Analysis Services by clicking Data tab... from Other Sources... From Analysis Services.
Then add your named sets using MDX as described here and create your calculated measures as described here.
Then drag and drop the fields and measures and sets to build your Pivot.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Community |