2
votes

This is Pentaho 3.8 CE which I think comes with Mondrian 3.5

This MDX produces a result:

WITH MEMBER [Items].[ItemType].[NonSales] as
[Items].[ItemType].[Deposit] + [Items].[ItemType].[Gift_Voucher]
SELECT 
{[Items].[NonSales]} ON COLUMNS,
[Measures].[AmtPaidExclGST] on rows
FROM [sales]

(the Dimension is Items. It has one Hierarchy, unnamed, and one level called ItemType.)

However, this doesn't:

WITH MEMBER [Items].[ItemType].[NonSales] as
[Items].[ItemType].[Deposit] + [Items].[ItemType].[Gift_Voucher]
SELECT 
{[Items].[ItemType].[NonSales]} ON COLUMNS,
[Measures].[AmtPaidExclGST] on rows
FROM [sales]

The difference is that successful Select Row uses a less-qualified version of the name of the calculated member. My reading of the MDX documentation indicates that a fully qualified member name should work. I expect both queries to produce the same result.

It does work for a real member. This works.

SELECT 
{[Items].[ItemType].[Deposit]} ON COLUMNS,
[Measures].[AmtPaidExclGST] on rows
FROM [sales]

I'm new to MDX and this is driving my crazy because I doubt my understanding of how to write member names.

1
Actually, I see in this example: msdn.microsoft.com/en-us/library/ms146017.aspx the Microsoft first writes "In the syntax for the WITH keyword, the Member_Identifier value is the fully qualified name of the calculated member. This fully qualified name includes the dimension or level to which the calculated member is associated."Tim Richardson

1 Answers

1
votes

Some old version of mondrian does not allow you to add member to level other than the root level (example of a root level member is ALL in some dimension). Possibly mondrian is adding calculated member (you can query using the dimension) but not able to associate to level (your query using [query 2]).

Thanks