[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:

      NON EMPTY {
      } 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:

      NON EMPTY {
      } 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 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" />
      <VirtualCube name="exports_and_imports">
          <CubeUsage cubeName="exports" ignoreUnrelatedDimensions="true" />
          <CubeUsage cubeName="imports" ignoreUnrelatedDimensions="true" />
        <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 name="CIF" dimension="Measures">
          <Formula>ValidMeasure([Measures].[CIF US])</Formula>
Any hint will be appreciated.


Manuel Aristarán

-------------- 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