I've a table where there's two dimensions in the row axis crossjoined and two dimensions plus a measure crossjoined in the column axis. Eg:
I would like to sort the rows of a specific column, taking the image as an example I would like to sort all rows so the ones under France -> apples -> avg_sales are sorted. Eg:
I've been able to find many examples on how to do this when there's just a bunch of measures as columns (with no crossjoin) and many different dimensions crossjoined in the row axis but I'm not able to find anywhere how to solve this particular situation.
I tried something like the following:
SELECT CrossJoin(
[Country].[Country].members,
CrossJoin(
[Product Category].[Product].members,
{[avg_sales]}
)
) on columns,
Order(
Filter(
CrossJoin(
[Date].[Year].Members,
[Date].[Month].Members
),
NOT IsEmpty(avg_sales)
),
CrossJoin(
[Country].[Country].[France],
CrossJoin(
[Product Category].[Product].[apples],
{[avg_sales]}
)
),
BDESC
) ON ROWS
FROM [Main Cube]
But MDX Order() function signature doesn't allow it, it complains by saying:
Mondrian Error: No function matches signature 'Order(<Set>, <Set>, <Symbol>)'