0
votes

I start on the subject and I have this error I totally understand but I can not solve the need that I wish :

All arguments to function ' {} ' must have same hierarchy .

I have a cube named test in which I use two dimensions usages ( Store and Product) and two dimensions ( Occupation and Yearly_Income ) and a Store sales measurement .

I would like a table with the different products on rows (it no worries) and Occupation and Yearly_Income on columns but I do not know how to work around this error.

select
     Crossjoin({[Measures].[Store sales]},{[Occupation].Members,[Yearly_Income].Members})

on columns,
{
    [Product].[Product Family].Members

} on rows

FROM test

Thank you.

1
did my answer not help? - whytheq

1 Answers

0
votes

This is more standard mdx:

SELECT
     [Occupation].Members 
    *[Yearly_Income].Members
ON COLUMNS,
[Product].[Product Family].Members ON ROWS
FROM test
WHERE [Measures].[Store sales];

The error msg: If you ever do this in mdx {X,Y,Z} then the curly braces are telling the processor that you want to create a set. A set must be made up of members from the same hierarchy but in your script you mized up members with different dimensionality in the same set. Hence the error msg.