The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

sylvain.tacquet (2) [Avatar] Offline

I am trying to put in place some measures that do not have the same dimension, and even not the same granularity for a given dimensions.
Simply, on the time dimension, my measure 'montant_charges' has granularity 'Year', whereas the others have 'Day' granularity (which is the granularity of the dimension time table).

However, the SQL computed shows that mondrian joins on the CDE_ANNEE column (e.g the_year in english). So my measure 'montant_charges' is X 365 (normal as CDE_ANNEE is not the PK of my dim table) ! Which is not what I expected and understood from the chapter 5.1.5 of the book.

Am I misunderstanding something or did I make some mistakes ?
Thanks in advance for your help.

Here is the SQL computed :
`dim_temps`.`CDE_ANNEE` as `c0`,
sum(`f_charges_magasins`.`montant_charges`) as `m0`
`dim_temps` as `dim_temps`,
`f_charges_magasins` as `f_charges_magasins`
`f_charges_magasins`.`CDE_ANNEE` = `dim_temps`.`CDE_ANNEE`
group by

Below is the part of xml used :
<MeasureGroup name='Charges' table='f_charges_magasins'>
<Measure name='montant_charges' column='montant_charges' aggregator='sum' formatString='Standard'/>
<ForeignKeyLink dimension='Magasins' foreignKeyColumn='DIM_MAGASINS_ID'/>
<ForeignKeyLink dimension='Time' foreignKeyColumn='CDE_ANNEE' attribute='Year' >
<Column name='CDE_ANNEE'/>
<NoLink dimension='dim_clients'/>
sylvain.tacquet (2) [Avatar] Offline
Re: Chapter 5.1.5 : Measures accross multiple table facts with different granul
Hi every one,

Has anyone an idea about this problem ? This would be an important feature (the ability to mix measures which have different granularities).