[Mondrian] Slicer axis ignored in query against a VirtualCube

Manuel Aristarán manuel at jazzido.com
Tue Nov 1 18:47:41 EDT 2016


Hi all,

I'm trying to create a VirtualCube, combining two other Cubes in my schema.
However, it seems that the slicer axis on queries made against this VirtualCube
are being ignored.

This query returns the expected results:

    SELECT
      NON EMPTY {
        [Measures].[FOB],
        [Measures].[CIF]
      } ON 0,
      NON EMPTY [Date].[Year].Members ON 1
    FROM [exports_and_imports]
   
This one returns the same results as the previous one, which is incorrect:

    SELECT
      NON EMPTY {
        [Measures].[FOB],
        [Measures].[CIF]
      } ON 0,
      NON EMPTY [Date].[Year].members ON 1
    FROM [exports_and_imports]
    WHERE (
            [Geography].[Region Name]
          ) 

Edited version of my schema:

    <Schema name="datachile">
      <Dimension name="Date" type="TimeDimension">...</Dimension>
    
      <Dimension name="Geography">...</Dimension>
    
      <Dimension name="Country">...</Dimension>
    
      <Dimension name=“HS”>...</Dimension>
    
      <Cube name="exports">
        <DimensionUsage name="Date" source="Date" foreignKey="date_id" />
        <DimensionUsage name="Destination Country" source="Country" foreignKey="country_dest_id" />
        <DimensionUsage name="Export Geography" source="Geography" foreignKey="exporter_comuna_id" />
        <DimensionUsage name="Export HS" source="HS" foreignKey="hs_level3" />
    
        <Measure name="FOB US" column="fob_us" aggregator="sum" />
      </Cube>
    
      <Cube name="imports">
        <DimensionUsage name="Date" source="Date" foreignKey="date_id" />
        <DimensionUsage name="Origin Country" source="Country" foreignKey="country_origin_id" />
        <DimensionUsage name="Import Geography" source="Geography" foreignKey="importer_comuna_id" />
        <DimensionUsage name="Import HS" source="HS" foreignKey="hs_6digits" />
    
        <Measure name="CIF US" column="cif_us" aggregator="sum" />
      </Cube>
    
    
      <VirtualCube name="exports_and_imports">
        <CubeUsages>
          <CubeUsage cubeName="exports" ignoreUnrelatedDimensions="true" />
          <CubeUsage cubeName="imports" ignoreUnrelatedDimensions="true" />
        </CubeUsages>
    
        <VirtualCubeDimension name="Date" />
        <VirtualCubeDimension name="Geography" />
        <VirtualCubeDimension name="HS" />
    
        <VirtualCubeMeasure cubeName="exports" name="[Measures].[FOB US]" />
        <VirtualCubeMeasure cubeName="imports" name="[Measures].[CIF US]"  />
    
        <CalculatedMember name="FOB" dimension="Measures">
          <Formula>ValidMeasure([Measures].[FOB US])</Formula>
        </CalculatedMember>
    
        <CalculatedMember name="CIF" dimension="Measures">
          <Formula>ValidMeasure([Measures].[CIF US])</Formula>
        </CalculatedMember>
      </VirtualCube>
    </Schema>
              
Any hint will be appreciated.

Best,

--
Manuel Aristarán
http://jazzido.com



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20161101/663fc297/attachment-0001.html 


More information about the Mondrian mailing list