如何使用 Mdx 可视化属性

How to Visualize properties with Mdx

我是 mdx 查询的新手。 我有我想在 geomondrian table 中可视化的空间属性,这是 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>

我想在列中获取 "geom" 比例,在行中获取产品

通常你是这样做的:

SELECT   
   [Measure] ON COLUMNS,  
   NON EMPTY [Store].MEMBERS  
   DIMENSION PROPERTIES   
             [Store].[geom] ON ROWS  
FROM [Cube]  

您在维度轴中列出维度属性

实际上我通过欺骗 临时 GeoMDX 查询的基本接口 中给出的 mdx 示例找到了解决方案

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