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 dimension.
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 Mondrian in Action.

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