Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top