I need to use the dimension field under the 2 hierarchies i.e., one hierarchy under another hierarchy in the MDX query.
Am having the below hierarchies/data in my cube:
I need to use the highlighted [Country] field in the MDX query.
Please find the query I have tried.
WITH MEMBER [Measures].[Expression1] AS [Geography].[Geography].[Country].currentmember.membervalue
select [Measures].[Expression1] on Columns from [Adventure Works]
But when am using the same syntax for a single hierarchy it works.
Please find the query and its result
WITH MEMBER
[Measures].[Expression1] AS [Geography].[Country].currentmember.membervalue
select [Measures].[Expression1] on Columns from [Adventure Works]
Am expecting the same result using the two hierarchy names of the field.
Can anyone please guide me to get the required value?
I don't think you need
WITH
orcurrentmember
or membervalue` at all.These two queries ought to list you the items within each hierarchy's level...