Page 1 of 1

How to write feeder that should feed second cube?

Posted: Wed Jul 13, 2011 7:18 am
by abcuser
Hi,
I have two cubes: Sales cube and BuyerLimit cube. In sales cube it is displayed all the quantity that is sold to buyers. In BuyerLimit cube there is a QuantityLimit measure, that is maximum quantity that our company is willing to sell (actually ship) to particular buyer acording to buyer's credit rating. Some of the buyers are problematic and so we don't want to ship them too much products, just to protect ourself of not getting paid for this products if buyer gets into financial problems.

Sales cube:
- Measure: QuantitySold, QuantityLimit (=>gets data from BuyerLimit cube)
- Market dimension --> market_total --> continents --> counties --> buyer --> buyer's_invoice
- TimeOfInvoice dimension (with hierarchy)
- TimeOfInvoiceExperation dimension (with hierarchy)
- OrganizationalUnit (with hierarchy)
- SalesType (with hierarchy)
- InvoinceType (with hierarchy)

BuyerLimit cube:
- Measure: QuantityLimit
- Market dimension --> market_total --> continents --> counties --> buyer

Notice, that BuyerLimit and Sales cube have common "Market dimension" which have exactly the same member structure except BuyerLimit does not have a buyer's_invoce level. This is reasonable, because QuantityLimit is only valid on buyer level.
In Sales cube I need QuantityLimit measure from BuyerLimit cube. So I wrote the rule in Sales cube:

Code: Select all

SKIPCHECK;
['QuantityLimit']=DB('BuyerLimit', !Market, 'QuantityLimit');
Above rule is working fine. So far so good. But using "suppress zeros" option in TM1 Architect Sales cube I notice QuantityLimit measure disappears from view. This is an indicator that feeder is missing.

According to documentation feeder should be written into BuyerLimit rules, so I did:

Code: Select all

['QuantityLimit']=>DB('Sales',!Market, 'QuantityLimit', TimeOfInvoiceTopMember, TimeOfInvoiceExperationTopMember, OrganizationalUnitTopMember, SalesTypeTopMember, InvoinceTypeTopMember);
Notice I have hard coded the names of top levels (names are xxx_TopMember of Sales cube, but this most probably dramatically overfeeds the cube, so I am in cube explosion state when server starts up.

How to write feeder that should feed second cube without cube explosion?

My system: TM1 v9.5.2 64-bit on Windows 2008 RC2 64-bit.
Thanks

Re: How to write feeder that should feed second cube?

Posted: Wed Jul 13, 2011 6:45 pm
by lotsaram
That you should feed a rule from the "source" of the calculation is just a rule of thumb, and as we all know rules of thumb don't always hold. You can't feed from a cube with a small number of dimensions to one with considderably more as this will quite literally cripple your server. Take a step back and think about in what cases is the buyers' limit relevant? Answer: when they have actually submited an order. Therefore feed buyer limit from invoice quantity IN THE SAME CUBE. It doesn't matter that the source of the feeder has nothing to do with the calculation, the purpose of the feeder is only to mark the cell so that it will consolidate and display in a zero supressed view.

Re: How to write feeder that should feed second cube?

Posted: Fri Jul 15, 2011 9:47 am
by abcuser
In Sales cube I did:

Code: Select all

FEEDERS;
['QuantitySold']=>['QuantityLimit'];
validated and saved the rule. When I click on "suppress zero" button and refresh, 'QuantitySold' still disappears. It looks like this feeder is not good. Am I doing something wrong?

Re: How to write feeder that should feed second cube?

Posted: Sun Jul 17, 2011 9:42 pm
by Martin Ryan
QuantitySold disappears? But isn't that an input value? Or is that calculated based on something else? If it's calculated based on something else then that is what you should be using as the source to your feeder.

Rule of thumb (noting lotsaram's point above about rules of thumb) is that the left hand side of a feeder should be an input value. Not 100% of the time, but the majority.

Martin

Re: How to write feeder that should feed second cube?

Posted: Mon Jul 18, 2011 7:51 am
by abcuser
Martin Ryan wrote:QuantitySold disappears?
Sorry, this was my typo mistake. QuantityLimit is the value that disappears when zero out is turned on. QuantitySold is input value (not calculated) and it does not disappear when zero out is turned on (my typo mistake).