TI process to fill element in cube with 1's
-
- Posts: 42
- Joined: Wed Nov 10, 2010 12:35 pm
- OLAP Product: Cognos 8 BI
- Version: 9.5.1
- Excel Version: Excel 2007
TI process to fill element in cube with 1's
Hello,
I want to fill a specific measure in cube with 1's. I can do this with rule ['My measure'] = N: 1; however, this rule will not work with feeders.
I can fill 1's with spreading (data spread > repeat leaves), but I don't want to do this manually every time when I zero out cube before loading data.
I figured that TI process will be the best choice. Could you please give me a basic example how to do this?
I want to fill a specific measure in cube with 1's. I can do this with rule ['My measure'] = N: 1; however, this rule will not work with feeders.
I can fill 1's with spreading (data spread > repeat leaves), but I don't want to do this manually every time when I zero out cube before loading data.
I figured that TI process will be the best choice. Could you please give me a basic example how to do this?
- qml
- MVP
- Posts: 1098
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: TI process to fill element in cube with 1's
A couple of questions.
What do you need this "measure" for?
Why would you want to feed this rule (do you need this measure to consolidate)?
Also, you can feed this rule, but it would have to be from a cell that is certain to have a value at all times.
Depending on what you need this for it might be a good solution to have this rule-based and not feed it. It would keep the memory usage to a minimum.
TI would also be possible and really easy to write (hint: think what your data source would be).
What do you need this "measure" for?
Why would you want to feed this rule (do you need this measure to consolidate)?
Also, you can feed this rule, but it would have to be from a cell that is certain to have a value at all times.
Depending on what you need this for it might be a good solution to have this rule-based and not feed it. It would keep the memory usage to a minimum.
TI would also be possible and really easy to write (hint: think what your data source would be).
Kamil Arendt
- vinnusea
- Posts: 116
- Joined: Thu Sep 23, 2010 6:12 pm
- OLAP Product: TM1
- Version: 10.2
- Excel Version: 2010
- Location: San Diego ,CA
Re: TI process to fill element in cube with 1's
Hi,
You can write TI process with while loops ,looping through all the elements in dimensions and populate 1's in all cube intersections and run process manually or in chores based on your requirement.
You can write TI process with while loops ,looping through all the elements in dimensions and populate 1's in all cube intersections and run process manually or in chores based on your requirement.
Thanks
Vinnusea
Vinnusea
-
- Site Admin
- Posts: 1458
- Joined: Wed May 28, 2008 9:09 am
Re: TI process to fill element in cube with 1's
Wouldn't it be easier to create a view with the cells to which you wish to write your 1s, then cellputn(1,... to each of them?
Not that I'm convinced that writing 1s all over a cube is a sensible design though.
Not that I'm convinced that writing 1s all over a cube is a sensible design though.
- qml
- MVP
- Posts: 1098
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: TI process to fill element in cube with 1's
Second that.David Usherwood wrote:Wouldn't it be easier to create a view with the cells to which you wish to write your 1s, then cellputn(1,... to each of them?
And that as well.David Usherwood wrote:Not that I'm convinced that writing 1s all over a cube is a sensible design though.
Kamil Arendt
-
- 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: TI process to fill element in cube with 1's
Depends on what you are using it for. I have employed this method to use as a feeder when there was simply no way to use any other data in the model with which to write an effective feeder. When I say effective, I mean one that isn't either ridiculously complicated or overfeeds. In these type situations I'll post a value of 1 to a dummy measure (usually called feeder_flag) for all combinations in the cube that need feeding and which I was not able to come up with a better way to feed. As long as I keep the feeder_Flag element populated appropriately it works great.David Usherwood wrote:Not that I'm convinced that writing 1s all over a cube is a sensible design though.
-
- MVP
- Posts: 263
- Joined: Fri Jun 27, 2008 12:15 am
- OLAP Product: Cognos TM1, CX
- Version: 9.0 and up
- Excel Version: 2007 and up
Re: TI process to fill element in cube with 1's
Agree with tomok, there are definitely situations where it is helpful to use this approach.
-
- MVP
- Posts: 352
- Joined: Wed May 14, 2008 1:37 pm
- OLAP Product: TM1
- Version: 2.5 to PA
- Excel Version: Lots
- Location: Sydney
- Contact:
Re: TI process to fill element in cube with 1's
is a different scenario totomok wrote:I'll post a value of 1 ... for all combinations in the cube that need feeding
Feeder flags in explicit combinations make sense, 1 in all combinations - depending on the purpose - possibly needs a design rethink.kudzis wrote:['My measure'] = N: 1;
Andy Key
- qml
- MVP
- Posts: 1098
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: TI process to fill element in cube with 1's
Guys, I don't think we have enough material for this argument to go on. The OP hasn't explained what he needs this for, so it could either be a good idea, or a bad one. Either way, there are a few ideas for the OP to go with in this thread.
Kamil Arendt
-
- Posts: 42
- Joined: Wed Nov 10, 2010 12:35 pm
- OLAP Product: Cognos 8 BI
- Version: 9.5.1
- Excel Version: Excel 2007
Re: TI process to fill element in cube with 1's
Hello,
sorry for a late reply and thank you everyone for your ideas and contributions to my problem.
I've solved my filling problem by creating a view as a source (selected only my 'dummy' measure and unchecked "skip zero/blank values"), then created a numeric variable (formula: variable = 1;), set contents to "data" and loaded everything into a cube.
Now for the need to do this. How can I feed this rule without using my 'dummy' measure:
['Parduodama šiluminė energija' ] = N: IF(DB('ag AG Informacija', !Versijos, !ag Tekstas, !ag AG, 'Parduodama šiluminė energija (taip/ne)')@='Taip',1,2);
sorry for a late reply and thank you everyone for your ideas and contributions to my problem.
I've solved my filling problem by creating a view as a source (selected only my 'dummy' measure and unchecked "skip zero/blank values"), then created a numeric variable (formula: variable = 1;), set contents to "data" and loaded everything into a cube.
Now for the need to do this. How can I feed this rule without using my 'dummy' measure:
['Parduodama šiluminė energija' ] = N: IF(DB('ag AG Informacija', !Versijos, !ag Tekstas, !ag AG, 'Parduodama šiluminė energija (taip/ne)')@='Taip',1,2);
- qml
- MVP
- Posts: 1098
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: TI process to fill element in cube with 1's
Do you need values calculated by this rule to consolidate? Maybe you can use a rule that would work for all elements (no "N:" quantifier) instead? If you really need it to consolidate normally (and therefore must feed it), all you need to have is one cell with a non-zero input value (it can be anywhere, even in a different cube) and you can feed from it to the top consolidations across your dimensions (feeding all their children). You do not need multiple cells filled with ones to feed this rule.
Kamil Arendt
-
- Posts: 42
- Joined: Wed Nov 10, 2010 12:35 pm
- OLAP Product: Cognos 8 BI
- Version: 9.5.1
- Excel Version: Excel 2007
Re: TI process to fill element in cube with 1's
No, but I need this measure as an intermediate step to calculate another measure, which needs to consolidate. Feeding the top elements would be a good idea though - I should give it a try.qml wrote:Do you need values calculated by this rule to consolidate?
- qml
- MVP
- Posts: 1098
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: TI process to fill element in cube with 1's
In which case you do not need to feed this intermediate measure at all. You just need to feed the final measure.kudzis wrote:No, but I need this measure as an intermediate step to calculate another measure, which needs to consolidate.
Kamil Arendt
-
- Posts: 42
- Joined: Wed Nov 10, 2010 12:35 pm
- OLAP Product: Cognos 8 BI
- Version: 9.5.1
- Excel Version: Excel 2007
Re: TI process to fill element in cube with 1's
Ok, I did some testing and that's what I found out ('dummy' measure is filled with 1's):qml wrote:In which case you do not need to feed this intermediate measure at all. You just need to feed the final measure.kudzis wrote:No, but I need this measure as an intermediate step to calculate another measure, which needs to consolidate.
Let's say I'm feeding rule ['Final measure'] = N: ['a'] + ['b'];
Feeder ['dummy'] => ['Final measure'] works fine;
Feeder [{'a','b'}] => ['Final measure'] is not working because 'a' and 'b' are calculated and not feeded properly.
So that's why I thought I needed to feed all intermediate measures.
-
- Posts: 42
- Joined: Wed Nov 10, 2010 12:35 pm
- OLAP Product: Cognos 8 BI
- Version: 9.5.1
- Excel Version: Excel 2007
Re: TI process to fill element in cube with 1's
Completely offtopic: qml, your avatar is from Grim Fandango?kudzis wrote:Ok, I did some testing and that's what I found out ('dummy' measure is filled with 1's):qml wrote:In which case you do not need to feed this intermediate measure at all. You just need to feed the final measure.kudzis wrote:No, but I need this measure as an intermediate step to calculate another measure, which needs to consolidate.
Let's say I'm feeding rule ['Final measure'] = N: ['a'] + ['b'];
Feeder ['dummy'] => ['Final measure'] works fine;
Feeder [{'a','b'}] => ['Final measure'] is not working because 'a' and 'b' are calculated and not feeded properly.
So that's why I thought I needed to feed all intermediate measures.
- qml
- MVP
- Posts: 1098
- Joined: Mon Feb 01, 2010 1:01 pm
- OLAP Product: TM1 / Planning Analytics
- Version: 2.0.9 and all previous
- Excel Version: 2007 - 2016
- Location: London, UK, Europe
Re: TI process to fill element in cube with 1's
You do not have to feed your final measure from your intermediate calculated measures. Just think about which input values cause the final measure to be zero or-non-zero. In some cases this might be impossible to establish and so you might have to feed in a way that is totally detached from the actual calculation path.kudzis wrote:Feeder [{'a','b'}] => ['Final measure'] is not working because 'a' and 'b' are calculated and not feeded properly.
So that's why I thought I needed to feed all intermediate measures.
Sometimes to avoid overfeeding it's a good idea to create some elaborate objects just to get the most optimal feeder. I'm not saying in your case that's the best option (as I don't know what exactly you're trying to do), but as a general rule it's always better to minimise those feeders that are not needed for anything.
PS: Yes, well spotted, my avatar is Manny from Grim Fandango.
Kamil Arendt
-
- 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: TI process to fill element in cube with 1's
I’ll give you my dog peeing on a bush example to help you understand. Let’s imagine there is a street in your neighborhood (a cube) that has a lot of bushes (cell intersections) on it. It’s Easter and you are going to have an Easter egg hunt for the kids. You send out a bunch of parents to hide Easters eggs in the bushes. Unfortunately, after they’ve all been hidden, you realize you don’t know how many actual eggs there are out there and this is something you really need to know (a consolidation). We also know that dogs have the unique ability to sniff out eggs and can be trained to pee on every bush that has an egg(s) (a feeder) hidden underneath it. Finally, you also have a robot (the TM1 consolidation engine) that can count eggs and has the unique ability to smell dog urine (a feeder).
So, we send out the neighborhood dogs to sniff out eggs and pee on the bushes. It doesn’t matter which dog pees on the bush, just as long as all the bushes with eggs get peed on. We unleash the robot, which stops only at the bushes with dog urine, and counts the eggs under the bush. So, the moral of the story is that a feeder is nothing more than a marker on a cell intersection so that the TM1 consolidation knows not to skip it when counting values and it doesn't matter where the marker comes from or whether it actually has any relation to the intersection being marked (although it usually does about 99% of the time).
So, we send out the neighborhood dogs to sniff out eggs and pee on the bushes. It doesn’t matter which dog pees on the bush, just as long as all the bushes with eggs get peed on. We unleash the robot, which stops only at the bushes with dog urine, and counts the eggs under the bush. So, the moral of the story is that a feeder is nothing more than a marker on a cell intersection so that the TM1 consolidation knows not to skip it when counting values and it doesn't matter where the marker comes from or whether it actually has any relation to the intersection being marked (although it usually does about 99% of the time).
-
- Posts: 42
- Joined: Wed Nov 10, 2010 12:35 pm
- OLAP Product: Cognos 8 BI
- Version: 9.5.1
- Excel Version: Excel 2007
Re: TI process to fill element in cube with 1's
That is a very nice example Tomok, thank you 

-
- MVP
- Posts: 352
- Joined: Wed May 14, 2008 1:37 pm
- OLAP Product: TM1
- Version: 2.5 to PA
- Excel Version: Lots
- Location: Sydney
- Contact:
Re: TI process to fill element in cube with 1's
Really? I would have said that the moral of the story is Don't eat easter eggs that you find under bushes...tomok wrote:So, the moral of the story is that a feeder is nothing more than a marker on a cell intersection so that the TM1 consolidation knows not to skip it when counting values and it doesn't matter where the marker comes from or whether it actually has any relation to the intersection being marked (although it usually does about 99% of the time).
Andy Key