Logical statements in feeder expressions
- ioscat
- Regular Participant
- Posts: 209
- Joined: Tue Jul 10, 2012 8:26 am
- OLAP Product: Contributor
- Version: 9.5.2 10.1.1 10.2
- Excel Version: 07+10+13
- Contact:
Logical statements in feeder expressions
Hello, dear forum!
Is it possible to make logical expression in feeders? I can't make right question to google.
Example: C = A*B, half of A is 0, half of B is 0 so we would like to feed C not from only A or B but from their multiplication.
The same with D = A+B, A-B.
Is it possible to make logical expression in feeders? I can't make right question to google.
Example: C = A*B, half of A is 0, half of B is 0 so we would like to feed C not from only A or B but from their multiplication.
The same with D = A+B, A-B.
-
- MVP
- Posts: 1831
- Joined: Mon Dec 05, 2011 11:51 am
- OLAP Product: Cognos TM1
- Version: PA2.0 and most of the old ones
- Excel Version: All of em
- Location: Manchester, United Kingdom
- Contact:
Re: Logical statements in feeder expressions
They generally get called "Conditional Feeders" or "Variable Feeders"; if you search the forum using those terms you will find a load of topics.
Declan Rodger
-
- MVP
- Posts: 2836
- Joined: Tue Feb 16, 2010 2:39 pm
- OLAP Product: TM1, Palo
- Version: Beginning of time thru 10.2
- Excel Version: 2003-2007-2010-2013
- Location: Atlanta, GA
- Contact:
Re: Logical statements in feeder expressions
In your case why not just write two feeders:?
A => C;
B => C:
A => C;
B => C:
- Harvey
- Community Contributor
- Posts: 236
- Joined: Mon Aug 04, 2008 4:43 am
- OLAP Product: PA, TM1, CX, Palo
- Version: TM1 8.3 onwards
- Excel Version: 2003 onwards
- Contact:
Re: Logical statements in feeder expressions
If I understand the question correctly, using two feeders would result in overfeeding by a factor of roughly two.
If efficient feeding is the primary concern, there are two possible approaches.
1) Create a measure, Z = A * B; then feed Z => C.
2) Use conditional feeders, [] => DB(IF(A<>0 & B<>0, 'your cube', ''), ... , C)
Obviously that's pseudo-code, but hopefully you get the gist.
Note that both solutions have their own inefficiencies and issues!
If efficient feeding is the primary concern, there are two possible approaches.
1) Create a measure, Z = A * B; then feed Z => C.
2) Use conditional feeders, [] => DB(IF(A<>0 & B<>0, 'your cube', ''), ... , C)
Obviously that's pseudo-code, but hopefully you get the gist.
Note that both solutions have their own inefficiencies and issues!
Take your TM1 experience to the next level - TM1Innovators.net
- ioscat
- Regular Participant
- Posts: 209
- Joined: Tue Jul 10, 2012 8:26 am
- OLAP Product: Contributor
- Version: 9.5.2 10.1.1 10.2
- Excel Version: 07+10+13
- Contact:
Re: Logical statements in feeder expressions
thaks everybody for the answers. We are searching mistake that resulted in overfeeding - 2,5GB for this cube. There is feeder like A (#very big consolidation of all dimension except leaf element B) => B (Leaf element). i think that overfeeding is about dimsiz ( myDimension).
Last edited by ioscat on Tue Aug 14, 2012 3:35 pm, edited 2 times in total.
- Steve Rowe
- Site Admin
- Posts: 2464
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: Logical statements in feeder expressions
Maybe post your actual rules and feeders will help as this theory based approach can be tricky.
For example if your rule is really C = A*B then you only need to feed with one of A or B and should pick the least populted of them.
There's no point trying to write a feeder that says feed with B when A is not populated since when A is not populated C=0 and so C should not be fed.
For example if your rule is really C = A*B then you only need to feed with one of A or B and should pick the least populted of them.
There's no point trying to write a feeder that says feed with B when A is not populated since when A is not populated C=0 and so C should not be fed.
Technical Director
www.infocat.co.uk
www.infocat.co.uk
- ioscat
- Regular Participant
- Posts: 209
- Joined: Tue Jul 10, 2012 8:26 am
- OLAP Product: Contributor
- Version: 9.5.2 10.1.1 10.2
- Excel Version: 07+10+13
- Contact:
Re: Logical statements in feeder expressions
there is a very big lot of cyrilic letters, it's annoying to retype. there about 3 pages a4 format of code. not now 
i'd like to ask several "theoretical" questions before.
C = A x B
A B C
1 1 1
1 0 0
0 1 0
0 0 0
in my example feeding from A column will cause overfeeding by factor 2.
A B C
1 1 1
1 0 0
1 0 0
1 0 0
and here - by factor 4
seems to need yo use conditional feeders

i'd like to ask several "theoretical" questions before.
C = A x B
A B C
1 1 1
1 0 0
0 1 0
0 0 0
in my example feeding from A column will cause overfeeding by factor 2.
A B C
1 1 1
1 0 0
1 0 0
1 0 0
and here - by factor 4
seems to need yo use conditional feeders
- Steve Rowe
- Site Admin
- Posts: 2464
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: Logical statements in feeder expressions
OK understood, you might try and post untranslated if the forum will take it, after a while you can look at the "shape" of the rules and not the actual words..
There are two critical things to understand about feeders.
1.They only take place at the N level in the system, they have no meaning at the C level.
2. If you put a C level in the left hand side of a feeder then this is short hand for a (potentially large) subset of all of the N levels below the consolidation. On the right hand side it means feed all the children of this consolidation.
Point 2 is usually where massive overfeeding comes into play
[ A, 'All Months'] => ['B' , 'All Months'];
is actually 144 feeder statements. Jan feeds all the Ns of All Months, Feb feeds all the Ns of all months etc etc etc.
This is the kind of thing you need to be looking for when checking for overfeeding not sweating the difference on your examples.
HTH
There are two critical things to understand about feeders.
1.They only take place at the N level in the system, they have no meaning at the C level.
2. If you put a C level in the left hand side of a feeder then this is short hand for a (potentially large) subset of all of the N levels below the consolidation. On the right hand side it means feed all the children of this consolidation.
Point 2 is usually where massive overfeeding comes into play
[ A, 'All Months'] => ['B' , 'All Months'];
is actually 144 feeder statements. Jan feeds all the Ns of All Months, Feb feeds all the Ns of all months etc etc etc.
This is the kind of thing you need to be looking for when checking for overfeeding not sweating the difference on your examples.
HTH
Technical Director
www.infocat.co.uk
www.infocat.co.uk
- ioscat
- Regular Participant
- Posts: 209
- Joined: Tue Jul 10, 2012 8:26 am
- OLAP Product: Contributor
- Version: 9.5.2 10.1.1 10.2
- Excel Version: 07+10+13
- Contact:
Re: Logical statements in feeder expressions
thanks, Steve, idea about months really surprised me a lot.
Is there any way to create feeder from final value of consolidation without making feeder from all leafs?
Is there any way to create feeder from final value of consolidation without making feeder from all leafs?
- Steve Rowe
- Site Admin
- Posts: 2464
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: Logical statements in feeder expressions
Well not really no using the same example if you write
[ A, 'All Months'] => ['B'];
Then this is 12 feeders, since you have not specified a month on the right Jan feeds Jan, Feb feeds Feb and so on.
There are two types of overfeeding and only one causes the RAM to bloat, which is overfeeding on the right.
Over feeding on the left looks like this.
[A , 'Big Consolidation']=>[ B, 'N level'];
This will take a long time to evaluate but shouldn't cause a RAM problem since we only ever feed the one cell.
Over feeding on the right you won't be surprised to learn is the opposite.
[ A , 'N Level'] => [B , 'Big Consolidation']
One cell feeds many, causing RAM bloat since cells are fed and maybe rules evaluated where they are not required.
Cheers
[ A, 'All Months'] => ['B'];
Then this is 12 feeders, since you have not specified a month on the right Jan feeds Jan, Feb feeds Feb and so on.
There are two types of overfeeding and only one causes the RAM to bloat, which is overfeeding on the right.
Over feeding on the left looks like this.
[A , 'Big Consolidation']=>[ B, 'N level'];
This will take a long time to evaluate but shouldn't cause a RAM problem since we only ever feed the one cell.
Over feeding on the right you won't be surprised to learn is the opposite.
[ A , 'N Level'] => [B , 'Big Consolidation']
One cell feeds many, causing RAM bloat since cells are fed and maybe rules evaluated where they are not required.
Cheers
Technical Director
www.infocat.co.uk
www.infocat.co.uk
- ioscat
- Regular Participant
- Posts: 209
- Joined: Tue Jul 10, 2012 8:26 am
- OLAP Product: Contributor
- Version: 9.5.2 10.1.1 10.2
- Excel Version: 07+10+13
- Contact:
Re: Logical statements in feeder expressions
Steve, maybe you should write a book about Tm1?