Ssas MDX选择和显示属性

Ssas MDX选择和显示属性,ssas,mdx,Ssas,Mdx,如何在查询结果中直接显示属性?您需要将属性定义为度量值: SELECT [Measures].[BudgetAmount] ON COLUMNS, NON EMPTY [Date].[Calendar].[Month].MEMBERS.Properties("YYYYMM") --DIMENSION PROPERTIES [Date].[Calendar].[YYYYMM] ON ROWS FROM [WH_Cube] 或 免责声明:这不是很漂亮(轻描淡写)+不是

如何在查询结果中直接显示属性?

您需要将属性定义为度量值:

SELECT 
   [Measures].[BudgetAmount] ON COLUMNS,
   NON EMPTY [Date].[Calendar].[Month].MEMBERS.Properties("YYYYMM")
    --DIMENSION PROPERTIES [Date].[Calendar].[YYYYMM] 
   ON ROWS
FROM [WH_Cube]


免责声明:这不是很漂亮(轻描淡写)+不是你想要的格式-我猜你希望日期看起来像“2014年9月”

与
成员[度量值][DateValueX]为
VBA!cstr(
VBA!一年(
VBA!cdate(格式(
VBA!cdate(
[日期][日历][月份].CURRENTMEMBER.member_值),
“dd-MMMM-yyyy”
)
)
)
)
+
VBA!cstr(
VBA!一个月(
VBA!cdate(格式(
VBA!cdate(
[日期][日历][月份].CURRENTMEMBER.member_值),
“dd-MMMM-yyyy”
)
)
)
)
挑选
{
[措施][DateValueX],
[措施][预算山]
}     
在专栏上,
非空
后代(
[日期][日历][月份][201409]//
With Member [Measures].[YYYYMM] as [Date].[Calendar].CurrentMember.Name
With Member [Measures].[YYYYMM] as [Date].[Calendar].CurrentMember.Properties("Some Custom Property")
WITH
MEMBER [Measures].[DateValueX] as
  VBA!cstr(
    VBA!YEAR(
      VBA!cdate(format(
      VBA!cdate(
        [Date].[Calendar].[Month].CURRENTMEMBER.member_value),
        "dd MMMM yyyy"
      )
      )
    )
  )
+
  VBA!cstr(
    VBA!MONTH(
      VBA!cdate(format(
      VBA!cdate(
        [Date].[Calendar].[Month].CURRENTMEMBER.member_value),
        "dd MMMM yyyy"
      )
      )
    )
  )
SELECT 
  {
  [Measures].[DateValueX],
  [Measures].[BudgetAmount]
  }     
  ON COLUMNS,
NON EMPTY 
  DESCENDANTS(
    [Date].[Calendar].[Month].[201409], //<<you might need to amend [201409] to your cube
    [Date].[Calendar].[Calendar Day]    //you might need to amend [Calendar Day] to your cube
    )
  ON ROWS
FROM [WH_Cube]
WITH MEMBER [Measures].[DateValueY] as
  [Date].[Calendar].CURRENTMEMBER.Parent.Properties('key0', TYPED)
SELECT 
  {
  [Measures].[DateValueY],
  [Measures].[BudgetAmount]
  }     
  ON COLUMNS,
NON EMPTY 
  DESCENDANTS(
    [Date].[Calendar].[Month].[201409], //<<you might need to amend [201409] to your cube
    [Date].[Calendar].[Calendar Day]    //you might need to amend [Calendar Day] to your cube
    )
  ON ROWS
FROM [WH_Cube]