Mondrian MDX Query error:- All arguments to function '{}' must have same hierarchy
Mondrian MDX Query error:- All arguments to function '{}' must have same hierarchy
我正在使用 Tibco Jaspersoft 生成报告。
预期结果:-
已创建架构文件:
<Schema name="Telemetry Count Schema">
<Cube name="Telemetry Count Cube" cache="true" enabled="true">
<Table name="device_telementry">
</Table>
<Dimension type="StandardDimension" foreignKey="companyId" name="Tenant">
<Hierarchy hasAll="true" allMemberName="All Tenant" primaryKey="id">
<Table name="device">
</Table>
<Level name="Tenant Level " column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="subscriptionId" name="Subscription">
<Hierarchy hasAll="true" allMemberName="All Subscription" primaryKey="id">
<Table name="subscription">
</Table>
<Level name="Subscription Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="applicationId" name="Application">
<Hierarchy hasAll="true" allMemberName="All Application" primaryKey="id">
<Table name="application">
</Table>
<Level name="Application Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="gatewayId" name="Gateway">
<Hierarchy hasAll="true" allMemberName="All Gateway" primaryKey="id">
<Table name="gateway">
</Table>
<Level name="Gateway Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="deviceId" name="Device">
<Hierarchy hasAll="true" allMemberName="All Device" primaryKey="id">
<Table name="device">
</Table>
<Level name="Device Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Measure name="Telemetry Count" column="telemetry_count" aggregator="sum" visible="true">
</Measure>
<Measure name="Telemetry Item Count" column="telemetry_item_count" aggregator="count" visible="true">
</Measure>
</Cube>
</Schema>
MDX 查询:-
select {[Measures].[Telemetry Count], [Measures].[Telemetry Item Count]} ON COLUMNS,
{[Gateway].[All Gateway], [Gateway].[All Gateway].Children, [Device].[All Device], [Device].[All Device].Children} ON ROWS
from [Telemetry Count Cube]
错误信息:
Mondrian Error: All arguments to function '{}' must have same
hierarchy.
我做错了什么?
生成的 MDX 查询:-
select {[Measures].[Telemetry Count], [Measures].[Telemetry Item Count]} ON COLUMNS,
NON EMPTY
{ CrossJoin ( {([Application].members)}, {CrossJoin ( {([Gateway].members)}, {([Device].members)} ) }) }
ON ROWS
from [Telemetry Count Cube]
我正在使用 Tibco Jaspersoft 生成报告。
预期结果:-
已创建架构文件:
<Schema name="Telemetry Count Schema">
<Cube name="Telemetry Count Cube" cache="true" enabled="true">
<Table name="device_telementry">
</Table>
<Dimension type="StandardDimension" foreignKey="companyId" name="Tenant">
<Hierarchy hasAll="true" allMemberName="All Tenant" primaryKey="id">
<Table name="device">
</Table>
<Level name="Tenant Level " column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="subscriptionId" name="Subscription">
<Hierarchy hasAll="true" allMemberName="All Subscription" primaryKey="id">
<Table name="subscription">
</Table>
<Level name="Subscription Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="applicationId" name="Application">
<Hierarchy hasAll="true" allMemberName="All Application" primaryKey="id">
<Table name="application">
</Table>
<Level name="Application Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="gatewayId" name="Gateway">
<Hierarchy hasAll="true" allMemberName="All Gateway" primaryKey="id">
<Table name="gateway">
</Table>
<Level name="Gateway Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Dimension type="StandardDimension" foreignKey="deviceId" name="Device">
<Hierarchy hasAll="true" allMemberName="All Device" primaryKey="id">
<Table name="device">
</Table>
<Level name="Device Level" column="name" type="String" uniqueMembers="true" levelType="Regular" hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Measure name="Telemetry Count" column="telemetry_count" aggregator="sum" visible="true">
</Measure>
<Measure name="Telemetry Item Count" column="telemetry_item_count" aggregator="count" visible="true">
</Measure>
</Cube>
</Schema>
MDX 查询:-
select {[Measures].[Telemetry Count], [Measures].[Telemetry Item Count]} ON COLUMNS, {[Gateway].[All Gateway], [Gateway].[All Gateway].Children, [Device].[All Device], [Device].[All Device].Children} ON ROWS from [Telemetry Count Cube]
错误信息:
Mondrian Error: All arguments to function '{}' must have same hierarchy.
我做错了什么?
生成的 MDX 查询:-
select {[Measures].[Telemetry Count], [Measures].[Telemetry Item Count]} ON COLUMNS,
NON EMPTY
{ CrossJoin ( {([Application].members)}, {CrossJoin ( {([Gateway].members)}, {([Device].members)} ) }) }
ON ROWS
from [Telemetry Count Cube]