Hi,

I have designed a cube with three dimensions and a fact table all belonging
to a single fact table in Druid. I am able to query the data using calcite
and druid's sql functionality. The issue I am facing is this.

The total value for the metric in the cube is *148575*. When I query the
cube using the following MDX:
QUERY 1:
*SELECT ( {[Measures].[Metric1]}) ON COLUMNS, {[Year].Members *
[StoreType].Members} on ROWS from [CUBE1]*

*                    Metric1==== ============== =================2017
ACTIVE STORE             142,745     INACTIVE STORE             5,830*

*Generated SQL:*


*select "StoreCount"."opportunitytype" as "c0", "StoreCount"."year" as
"c2", sum("StoreCount"."storecount") as "m0" from "StoreCount" as
"StoreCount" where  "StoreCount"."year" = '2017' group by
"StoreCount"."opportunitytype", "StoreCount"."year"*

QUERY 2:
*SELECT ( {[Measures].[Metric1]}) ON COLUMNS, {[Year].Members} on ROWS from
[CUBE1]*




*                    Metric1==== =================2017
 142,745Generated SQL:select "StoreCount"."opportunitytype" as "c0",
"StoreCount"."year" as "c2", sum("StoreCount"."storecount") as "m0" from
"StoreCount" as "QuarterlyOpportunityStoreCount" where
"StoreCount"."opportunitytype" = 'ACTIVE STORE' and "StoreCount"."year" =
'2017' group by "StoreCount"."opportunitytype", "StoreCount"."year"*
I get the value from MDX but it is not *148575*. I checked the sql and
found that mondrian generates sql properly but only passes ACTIVE STORE as
a filter value in sql and does not generate an IN query which results into
the value corresponding only to that opportunitytype.

There are no properties of mondrian that are modified.
Calcite version tested on: 1.12.0/1.13.0/1.14.0
Mondrian version: 4.3.0-130
Attached is the xml model

Please help as to what could be the issue.

Thanks
Divye Sheth

Reply via email to