Here is a beginner question. In a MDX query, how do I return dimension properties ? The only way I found is to add this alias on column dimension using WITH MEMBER
.
WITH
MEMBER [Measures].[User Email] as [User].CurrentMember.Properties("Email")
SELECT {
[Measures].[User Email],
[Measures].[Total Fees Value]
} ON COLUMNS,
NON EMPTY {
CrossJoin([Order].Children, [User].Children)
} ON ROWS
FROM [LineItemFact]
WHERE ([DateOfSalePst.Days].[2013])
This seems a bit clunky. Problems come up if I want to display grand totals by adding ([Order].[All], [User].[All])
in the row axis. It will try to calculate sums for all the columns and will return exceptions in the User Email
because, naturally, it can't calculate sum on email string.
Isn't there a better way to get properties in MDX ?