I have a aggregate tables for fact table. There is an avg measure [Measures].[Pc in avg by hour] in cube. I dont understand why mondrian covert this MDX query:
Code:
SELECT {[Measures].[Pc in avg by hour]} ON COLUMNS,
    [Renter].Children ON ROWS
FROM [Renter]
to this SQL query:
Code:
select `renter`.`id` as `c0`, 
    sum(`agg_r_renter_fact`.`pc_in_avg_by_hour`) / sum(`agg_r_renter_fact`.`fact_count`) as `m0`
from `renter` as `renter`, `agg_r_renter_fact` as `agg_r_renter_fact`
where `agg_r_renter_fact`.`renter_id` = `renter`.`id`
group by `renter`.`id`
instand of this:
Code:
select `renter`.`id` as `c0`, 
    avg(`agg_r_renter_fact`.`pc_in_avg_by_hour`) as `m0`
from `renter` as `renter`, `agg_r_renter_fact` as `agg_r_renter_fact`
where `agg_r_renter_fact`.`renter_id` = `renter`.`id`
group by `renter`.`id`
How i see. Mondrian have a bug with avg measure and aggregate table. Or is it my mistake?