Page 1 of 1

How to build feeder?

Posted: Mon Feb 24, 2014 3:11 pm
by Motyl
I have 2 cube
Cube1:
Version,Person,Month,Year,Region, Measures: AvgPrice,QTY,Amount
Cube2 Month,Year,Region, AvgPrice

Rule in cube1 :
Skipcheck;
['AvgPrice' ] =N: DB('Cube2',DIMNM('Year', DIMIX('Year' , !Year)-1), !Month, !Region);
['Amount' ] = ['AvgPrice' ] *['Qty' ] ;

How to build feeders (I'm newbie)?

Re: How to build feeder?

Posted: Mon Feb 24, 2014 4:15 pm
by tomok
Just saying "I'm a newbie" does not give you a free pass from having the responsibility to actually read the documentation for TM1 before posting. This is extremely basic TM1 rules here and well covered in the TM1 Rules Guide.

Re: How to build feeder?

Posted: Mon Feb 24, 2014 11:28 pm
by nedcpatm1
Read through the material on Feeder here : http://www.ibm.com/developerworks/data/ ... ge620.html. Read through this doc if you use Performance Modeler… http://pic.dhe.ibm.com/infocenter/ctm1/ ... m1ref.html

Re: How to build feeder?

Posted: Tue Feb 25, 2014 10:04 am
by Motyl
Thnks for links, I have problem because i need build feder in both cubes.
But cubes don't have same dimension's.
Could you help me with my first feeder? I'll shout you a beer ;-)

Re: How to build feeder?

Posted: Tue Feb 25, 2014 10:20 am
by declanr
Motyl wrote:I have problem because i need build feder in both cubes.
No you don't.

A cell needs to be fed, it does not necessarily need to be fed from the source of the rule. First of all looking at the cubes you have and the fact your rule brings one value into probably a hell of a lot of cells, i would question whether that is the best idea in the first place.

Ignoring that however, it is probably irrelevant seeing what the "AVGPrice" is unless there is also a "QTY"; so I would just feed from "QTY" to "AVGPrice"

If you absolutely needed to feed from a cube of less dimensions to a cube of more (or different dimensions) you can either set up mapping via attributes; if it's possible... or failing that just feed the top consolidated element of the dimension that doesn't exist in the source cube. This would usually result in massive over feeding though.

My recommendation would be to instead of looking at how to get this rule/feeder to work; take a step back, decide what your end goal is, what data you have available and consider whether there is maybe a better structure available to use. I'm not saying that your design is wrong, you could definitely get it to work, I would just normally view that sort of cube structure/rule as a red flag if doing a system "health check" somewhere. If the dimensions grew significantly and you were feeding consolidations etc the consequences would (often) be a slow system.

Re: How to build feeder?

Posted: Tue Feb 25, 2014 1:21 pm
by tomok
Just think about it for literally one minute. You are calculating sales by taking average price from one cube, times quantity in another cube AND you want this sales value to be in the same cube as quantity. What is the driving force behind sales???? Quantity right? No quantity then no sales. So your feeder in Cube 1:

['Qty'] => ['Amount'];

This is almost verbatim from the examples given in the IBM documentation BTW.

Re: How to build feeder?

Posted: Wed Feb 26, 2014 1:56 pm
by Motyl
Don't work, when i check suppress zero.Cells with values in avgprice disappear.

Re: How to build feeder?

Posted: Wed Feb 26, 2014 3:35 pm
by kdunic
Is Qty in Cube2 fed (right click on the leaf cell>check feeders)?

As tomok mentioned, you should be able to feed from Qty within Cube1. If Qty is comes from another cube or is a calculated within Cube1, then it's probably not the best value to feed from - Inter-cube feeders come with a lot of overhead and can lead to overfeeding/bad performance when dimensions don't match up as seen in your example.

Also remember that when you are testing feeders it's important to process the feeders on the cube, or recycle the TM1 service periodically because once a cell is fed, you cannot un-feed it which may lead to mixed test results.

Re: How to build feeder?

Posted: Wed Feb 26, 2014 3:50 pm
by tomok
Motyl wrote:Don't work, when i check suppress zero.Cells with values in avgprice disappear.
Well, if you insist on feeding avgprice (and i don't know why you would because the aim is to calculate Sales and it is not necessary to feed avgprice for that to work correctly) then you would just add one more line:

['Qty'] => ['AvgPrice'];

Are you seriously going to tell me you haven't tried that already?