MDX 查询 - 如何使用成员属性?
我对 MDX / OLAP(“数据仓库”)完全是个新手。我有以下 MDX 查询,并希望我的结果显示月份的数字(1 = 一月,12 = 十二月)。幸运的是,多维数据集创建者创建了一个名为“Month Number Of Year”的成员属性,
当我尝试运行查询时,我得到以下结果... “查询 (4, 8) 该函数需要第 1 个参数的元组集表达式。使用了字符串或数字表达式。”
有解决这个问题的建议吗?
谢谢!
WITH
MEMBER [Measures].[Tmp] as '[Measures].[Budget] / [Measures].[Net Income]'
SELECT {[Date].[Month].Properties("Month Number Of Year")} ON COLUMNS,
{[Measures].[Budget],[Measures].[Net Income],[Measures].[Tmp]} ON ROWS
FROM [AnalyticsCube]
I'm a complete newb to MDX / OLAP, "data warehousing" in general. I have the following MDX query and would like my results to display the month's number (1 = January, 12 = December). Luckily, the cube creator created a member property named "Month Number Of Year"
When I try to run the query, I get the following...
"Query (4, 8) The function expects a tuple set expression for the 1 argument. A string or numeric expression was used."
Any suggestions for fixing this?
Thanks!
WITH
MEMBER [Measures].[Tmp] as '[Measures].[Budget] / [Measures].[Net Income]'
SELECT {[Date].[Month].Properties("Month Number Of Year")} ON COLUMNS,
{[Measures].[Budget],[Measures].[Net Income],[Measures].[Tmp]} ON ROWS
FROM [AnalyticsCube]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
看起来您正在尝试获取属性?如果是这样,语法如下:
http://www.ssas-info.com/analysis-services-faq/27-mdx/167-how-can-i-get-attribute-key-with-mdx
因此,如果您的原始 MDX 很接近,请尝试:
或者您的意思是日期维度将此作为成员,在这种情况下您将使用:
It looks like you're trying to get an attribute? If so the syntax looks like:
http://www.ssas-info.com/analysis-services-faq/27-mdx/167-how-can-i-get-attribute-key-with-mdx
So if your original MDX is close, try:
Or do you mean the date dimension has this as a member, in which case you'd use: