I need to use the dimension field under the 2 hierarchies ie, 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
or currentmember
or membervalue` at all.
These two queries ought to list you the items within each hierarchy's level...
select {[Geography].[Country].members} on Columns from [Adventure Works]
select {[Geography].[Geography].[Country].members} on Columns from [Adventure Works]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.