Reputation: 28306
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]
Upvotes: 4
Views: 20347
Reputation: 5999
It looks like you're trying to get an attribute? If so the syntax looks like:
WITH
MEMBER Measures.ProductKey as [Product].[Product Categories].Currentmember.Properties("Key")
SELECT {Measures.ProductKey} ON axis(0),
[Product].[Product Categories].Members on axis(1)
FROM [Adventure Works]
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:
[Date].[Month].CurrentMember.Properties("Month Number Of Year")
Or do you mean the date dimension has this as a member, in which case you'd use:
[Date].[Month Number Of Year]
Upvotes: 3