Member Properties using DIMENSION PROPERTIES

  • Hi there,

    I'm trying to return (as rows), the customer name, and the gender of the customer. I am trying to use the "DIMENSION PROPERTIES"  to achieve this - see below (uses Foodmart 2000 db). Runs ok, but query result is the same regardless of whether I put in PROPERTIES [Customers].[Gender]  - seems to have no effect on axes!

    Help

    Regards

    Chris

     

    SELECT

       {[Measures].[Unit Sales]} ON COLUMNS,

        Descendants([Customers].[All Customers],50,LEAVES)  DIMENSION PROPERTIES [Customers].[Gender] ON ROWS

    From [SALES]

     

  • the information should be there, it probably depends a little on the querying tool as to how it is displayed.  Assuming you're using the mdx sample app, if you dbl-click on on of your row members you'll see the intrinsic and custom properties (in particular the custom property shown will be the gender).

    Steve.

  • Thanks for that - I actually am querying it in SQL server (linked server), with the intention of using it in a stored procedure.

    sounds like this is not possible then..?

     

    Chris

  • Chris,

    this should do what you want, but is likely to not produce the exact output you'll want if yo start wanting to crossjoin on the columns (ie measures, in this case).

    WITH MEMBER [measures].[chris] AS 'Customers.CurrentMember.Properties("Gender")'

    SELECT

       {[Measures].[Unit Sales], [measures].[chris]} ON COLUMNS,

        Descendants([Customers].[All Customers],50,LEAVES)  DIMENSION PROPERTIES [Customers].[Gender] ON ROWS

    From [SALES]

    Steve.

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply