Tag - mdx

mondrian schema mdx OpenBI    2017-03-26 21:15:02    944

如下schema代码片段:

  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <Schema name="报表">
  3. <cube name="cube_qc_pass_item" caption="报表1" encoding="UTF-8">
  4. <table name="fact_qc_pass_record_item_join">
  5. <Dimension name="models" foreignKey="model_id" caption="模板">
  6. <Hierarchy hasAll="true" allMemberName="model_name" primaryKey="id" primaryKeyTable="dim_qc_model">
  7. <Table name="dim_qc_model" />
  8. <Level name="model_name" column="name" caption="模板"/>
  9. <Level name="model_id" column="id" caption="model_id"/>
  10. </Hierarchy>
  11. </Dimension>
  12. <Measure name="times" column="id" aggregator="count" formatString="#,###0" datatype="Numeric" caption="总量"/>
  13. </cube>
  14. </Schema>

我想要在使用mdx查询的时候,使用model_name显示,使用model_id作为查询条件限制某个model_id,该如何书写mdx语句?

已经有如下错误的mdx语句了

mdx查询语句1:

  1. SELECT
  2. NON EMPTY {Hierarchize({{[Measures].[times], [Measures].[notPass], [Measures].[pass]}})}