[英]How to use multi level hierarchy names in MDX query
我需要使用 2 個層次結構下的維度字段,即 MDX 查詢中另一個層次結構下的一個層次結構。
我的多維數據集中有以下層次結構/數據:
我需要在 MDX 查詢中使用突出顯示的[Country]字段。
請找到我嘗試過的查詢。
WITH MEMBER [Measures].[Expression1] AS [Geography].[Geography].[Country].currentmember.membervalue
select [Measures].[Expression1] on Columns from [Adventure Works]
但是,當我對單個層次結構使用相同的語法時,它可以工作。
請找到查詢及其結果
WITH MEMBER
[Measures].[Expression1] AS [Geography].[Country].currentmember.membervalue
select [Measures].[Expression1] on Columns from [Adventure Works]
我期望使用該字段的兩個層次結構名稱獲得相同的結果。
誰能指導我獲得所需的價值?
我認為您根本不需要WITH
或currentmember
或 membervalue`。
這兩個查詢應該列出每個層次結構級別中的項目......
select {[Geography].[Country].members} on Columns from [Adventure Works]
select {[Geography].[Geography].[Country].members} on Columns from [Adventure Works]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.