Andy Key wrote:You don't say at what level you are storing your attribute. But assuming that the value 'F2016 P12' is repeated for each of '2016.48' to '2016.53' then you need to use this attribute in the feeder. Rules are happy to use C level elements as the source of data if the names match, but Feeders only work from the N level. (You can use a C level in a feeder, but this is only a shorthand way of specifying all the N levels underneath it, and it is the N level element names that will be used when trying to match across dimensions.) As this means that you need to feed from '2016.48' etc. to 'F2016 P12' there needs to be some way to link the N level of year_week to the N level of Months, and this is what the attribute will give you.
So, same rule as Tomok suggests for VENTES_PERIODES.
['Name of your measure'] = N:
DB('VENTES',!Produits,!Routes,!Rabais,!client,!BalType,!Version,!banner div,!Months,!Mesures);
But for the feeder, in VENTES:
['Name of your measure'] =>
DB('VENTES_PERIODES',!Produits,!Routes,!Rabais,!client,!BalType,!Version,!banner div,AttrS( 'year_week',!year_week,'fp'),!Mesures);
You could use ElPar in the feeder, but if you have multiple hierarchies in your dimension you can't guarantee which hierarchy ElPar is going to be looking at.
Thanks to both of you!
I tried this syntax and it worked right away. It allowed me to figure out some basic principles behind inter cube feeding. My code as it stand right now look like this:
VENTES_PERIODES (destination):
['BB$'] = N:DB('VENTES',!Produits,!Routes,!Rabais,!client,'Bkd', 'Réel',!banner_div,!Months,'BB$');
['BB$ Deb'] = N:DB('VENTES',!Produits,!Routes,!Rabais,!client,'Bkd', 'Réel',!banner_div,!Months,'BB$ Deb');
['BB$ Calc'] = N:DB('VENTES',!Produits,!Routes,!Rabais,!client,'Bkd', 'Réel',!banner_div,!Months,'BB$ Calc');
VENTES (SOURCE):
FEEDERS;
['BB$'] => DB('VENTES_PERIODES',!Produits,!Routes,!Rabais,!client,'Bkd', 'Réel',!banner_div,AttrS( 'year_week',!year_week,'fp'),'BB$');
['BB$ Deb'] => DB('VENTES_PERIODES',!Produits,!Routes,!Rabais,!client,'Bkd', 'Réel',!banner_div,AttrS( 'year_week',!year_week,'fp'),'BB$ Deb');
['BB$ Calc'] => DB('VENTES_PERIODES',!Produits,!Routes,!Rabais,!client,'Bkd', 'Réel',!banner_div,AttrS( 'year_week',!year_week,'fp'),'BB$ Calc');
We are not feeding all elements so I put some restriction ('Bkd', 'Réel'). I replaced !Measures by the name of the measure being feed, but it seems unnecessary. As I understand it, it take the context of the destination if we leave !Measure. It just seems more intuitive that way. What is the best practice?