报表中为空cells/offset:如何在多维数据集中定义维度和层次结构?

Empty cells/offset in the report: how to define a dimension and hierarchy in the cube?

我想分析一些过程的一些动态。为此,我将 Saiku 分析插件 CE 用于 Pentaho 商业智能服务器 CE 5.0.1。

有一个 table 的事实和一个 table 的维度用于执行一些聚合。维度表示层次结构 "Year - Month - Day".

我分两次创建了一些报告——按年和按月。报告如下所示:

显示的数据正确:

如果我定义一个独立的维度 "Month",报告看起来是正确的:

但是,数据已经不对了:

我尝试添加反维度"Month - Year",但没有看到任何数据。

有没有一种方法可以定义报表不包含空单元格的维度?

我找到了解决方案 - 问题出在错误的日期维度上。

在此处查看详细答案:Create a date range in mysql

新蒙德里安模式:

<Schema name="MondrianSchema">
  <Dimension type="TimeDimension" visible="true" highCardinality="false" name="X dimension">
    <Hierarchy name="X_hierarchy" visible="true" hasAll="true" primaryKey="date_key">
      <Table name="tbl_declaration_date_dim" schema="dbo">
      </Table>
      <Level name="Year" visible="true" table="tbl_declaration_date_dim" column="Year" nameColumn="Year" type="Numeric" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never">
      </Level>
      <Level name="Month" visible="true" table="tbl_declaration_date_dim" column="Month" nameColumn="Month" ordinalColumn="Month" type="Numeric" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never">
      </Level>
      <Level name="Day" visible="true" table="tbl_declaration_date_dim" column="Day" nameColumn="Day" ordinalColumn="Day" type="Numeric" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never">
      </Level>
    </Hierarchy>
  </Dimension>
  <Dimension type="TimeDimension" visible="true" name="Y dimension">
    <Hierarchy name="Y_Hierarchy" visible="true" hasAll="true" primaryKey="date_key">
      <Table name="tbl_declaration_date_dim" schema="dbo" alias="">
      </Table>
      <Level name="Year" visible="true" table="tbl_declaration_date_dim" column="Year" nameColumn="Year" type="Numeric" uniqueMembers="true" levelType="TimeYears" hideMemberIf="Never">
      </Level>
      <Level name="Month" visible="true" table="tbl_declaration_date_dim" column="Month" nameColumn="Month" ordinalColumn="Month" type="Numeric" uniqueMembers="false" levelType="TimeMonths" hideMemberIf="Never">
      </Level>
      <Level name="Day" visible="true" table="tbl_declaration_date_dim" column="Day" nameColumn="Day" ordinalColumn="Day" type="Numeric" uniqueMembers="false" levelType="TimeDays" hideMemberIf="Never">
      </Level>
    </Hierarchy>
  </Dimension>
  <Cube name="tbl_application_cube" caption="..." visible="true" description="..." cache="true" enabled="true">
    <Table name="tbl_appl_olap_fact" schema="dbo">
    </Table>
    <DimensionUsage source="X dimension" name="X axis" visible="true" foreignKey="date_dim" highCardinality="false">
    </DimensionUsage>
    <DimensionUsage source="Y dimension" name="Y axis" visible="true" foreignKey="date_dim">
    </DimensionUsage>
    <Measure name="DeclarationCount" column="declaration_id" aggregator="count" visible="true">
    </Measure>
  </Cube>
</Schema>