December 11, 2014 at 2:15 am
Hello Experts,
I want to "UNION" members from an attribute from 1 dimension with with members of same attribute from another dimension.
As an example, below 2 sets are to be in union:
1. [Dim1].[Attb].Members
2. [Dim2].[Attb].Members
Tried below options:
1. Below query not working:
SELECT {} on 0
, UNION ( { [Dim1].[Attb].Members }, { [Dim2].[Attb].Members } )
FROM [Cube]
2. Below query not working:
WITH
--I have to use "EXISTS" in MDX, therefore separated the sets.
SET [Set1] AS [Dim1].[Attb].Members
SET [Set2] AS [Dim2].[Attb].Members
SELECT {} on 0
, UNION ( { [Set1] }, { [Set2] } ) on 1
FROM [Cube]
3. Tried with "CrossJoin" & "Nest" to see atleast it returns records, but not working.
Is it possible to "Union" data from different dimensions (same attribute)?
Any pointers would be helpful.
Thanks!!!
December 13, 2014 at 6:05 am
Is it possible to "Union" data from different dimensions (same attribute)?
No, that's a general rule of MDX, a set needs to have members that share the same dimensionality.
Having said that, Chris Webb has shown a method of doing this (by using crossjoin) that may give the output you're looking for. The blog post is here.
Steve.
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply