mdxmondrianmdx-query

How to Visualize properties with Mdx


I m new to the mdx query. I have spatial properties that i want to visualize in a geomondrian table, this is the schema of simple_geofoodmart.xml :

<!-- spatial store dimension -->
<Dimension name="Store" foreignKey="store_id">
  <Hierarchy hasAll="true" primaryKey="store_id" primaryKeyTable="geostore_store">
    <Join leftKey="store_city_id_fk" rightKey="store_city_id"
    rightAlias="geostore_city">
    <Table name="geostore_store" />
    <Join leftKey="store_state_id_fk" rightKey="store_state_id"
      rightAlias="geostore_state">
      <Table name="geostore_city" />
      <Join leftKey="store_country_id_fk" rightKey="store_country_id">
        <Table name="geostore_state" />
        <Table name="geostore_country" />
      </Join>
    </Join>
  </Join>
  <Level name="Store Country" table="geostore_country" column="store_country_name"
    uniqueMembers="true">
<Property name="geom" column="store_country_geom" type="Geometry" />
  </Level>
  <Level name="Store State" table="geostore_state" column="store_state_name"
    uniqueMembers="true">
<Property name="geom" column="store_state_geom" type="Geometry" />
  </Level>
  <Level name="Store City" table="geostore_city" column="store_city_name"
    uniqueMembers="false">
<Property name="geom" column="store_city_geom" type="Geometry" />
  </Level>
  <Level name="Store Name" table="geostore_store" column="store_name"
    uniqueMembers="true">
    <Property name="Store Type" column="store_type"/>
    <Property name="Store Manager" column="store_manager"/>
    <Property name="Store Sqft" column="store_sqft" type="Numeric"/>
    <Property name="Street address" column="store_street_address" type="String"/>
  </Level>
</Hierarchy>
</Dimension>

I want to get the "geom" proporty in columns and the products in rows


Solution

  • Actually i found a solution by tricking the mdx examples given in the Basic interface for ad hoc GeoMDX queries in localhost index

    with member Measures.geo as [Store].CurrentMember.Properties("geom")
    select {[Measures].geo} ON rows,
        {[Store].[All Stores].[USA]} ON columns
    from [Sales]