I want mondrian to rollup as per my dimension table. For example
fact_table(id int, dim_id)
- 1 2
- 2 2
- 3 1
- 4 3
dimension_table( dim_id, value)
- 1 first_value
- 2 second_value
The last value in fact_table is delibrately not in the list of dimensions
<Cube name="BYT">
<Dimension type="StandardDimension" visible="true"
highCardinality="false" name="d1">
<Hierarchy name="dimension_table" visible="true" hasAll="true">
<Table name="dimension_table">
</Table>
<Level name="dimension" visible="true" column="dim_id"
type="String" uniqueMembers="false" levelType="Regular"
hideMemberIf="Never">
</Level>
</Hierarchy>
</Dimension>
<Measure name="m1" column="id" datatype="Integer"
aggregator="count" visible="true">
</Measure>
<Cube>
when i fire the following query
select [Measure].[m1] on columns, {([d1])} on rows from [BYT]
The result is
- Dimension Measure
- All D1 4
What i would like mondrian to do is something like this
- Dimension Measure
- All D1 3
i.e. count only on the values included in the dimension table
Please suggest a solution. I read through the rollup policy in the documentation but that does not help my case.