Rules - Feed dimension attribute to a measure cell

Post Reply
nayitian
Posts: 26
Joined: Wed Apr 16, 2014 11:10 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Rules - Feed dimension attribute to a measure cell

Post by nayitian »

Hi,

I am having a cube, one of the dimensions 'Sequence' is just purely numbers from 1 to 100, I want to feed these numbers to one of the measurement Seq_Code in the cube.
It works when I add such line in the rules,
['Seq_Code'] = N:attrn('Sequence', !Sequence, 'Sequence_Alias');

but when I add SKIPCHECK, and tried to add a Feeders statement, it went wrong. These are what I added in the rules,
Feeders;
['Sequence': 'Sequence_Alias'] => DB('CbueName', !Dim1, !Sequence, 'Seq_Code');

Could you please tell me what the correct statement should be? Thank you so very much.
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Rules - Feed dimension attribute to a measure cell

Post by lotsaram »

Can you please provide actual code not pseudo code.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
nayitian
Posts: 26
Joined: Wed Apr 16, 2014 11:10 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: Rules - Feed dimension attribute to a measure cell

Post by nayitian »

lotsaram wrote:Can you please provide actual code not pseudo code.
Sure.

Cube Name: Courses
It has 3 dimensions, 1 Version (2010, 2011, ...)
2 Sequence ( 1, 2, ...100), it has an attribute 'Sequence_Alias' defined
3 Measurements (Seq_Code, Course_ID, Course_Name...)

The rules I wrote,
SkipCheck;
['Seq_Code'] = N:ATTRN('Sequence', !Sequence, 'Sequence_Alias');
Feeders;
['Sequence':'Sequence_Alias] => DB('Course', !Version, !Sequence, 'Seq_Code');
tomok
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: Rules - Feed dimension attribute to a measure cell

Post by tomok »

Why are you feeding the Seq_Code value? Is it because you don't want it to disappear on a zero suppress? If that is the case, do you just want it to not zero suppress when one or more of the other measures have a value? In that case you should feed from one of the other measures, not the Alias attribute (which, BTW, would not be recommended).
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
nayitian
Posts: 26
Joined: Wed Apr 16, 2014 11:10 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: Rules - Feed dimension attribute to a measure cell

Post by nayitian »

tomok wrote:Why are you feeding the Seq_Code value? Is it because you don't want it to disappear on a zero suppress? If that is the case, do you just want it to not zero suppress when one or more of the other measures have a value? In that case you should feed from one of the other measures, not the Alias attribute (which, BTW, would not be recommended).
The column Seq_Code is assigned with numbers to identify each row as being a unique instance. It's going to be used as a lookup to retrive other measures.
Hope it makes sense.

Thank you.
tomok
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: Rules - Feed dimension attribute to a measure cell

Post by tomok »

nayitian wrote:The column Seq_Code is assigned with numbers to identify each row as being a unique instance. It's going to be used as a lookup to retrive other measures.
Hope it makes sense.
You didn't answer my question. Why are you feeding it?
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Carl Lonsdale
Posts: 11
Joined: Thu Feb 14, 2013 7:20 pm
OLAP Product: TM1
Version: 9.52 - 10.1
Excel Version: 14.0.6129.5

Re: Rules - Feed dimension attribute to a measure cell

Post by Carl Lonsdale »

If I gather what you are trying to do correctly:
You would like to automatically feed the Sequence # FROM an Number Type Attribute named: 'Sequence_Alias' on the Dimension:Sequence to the Cube Value:
'Seq_Code' in Measure.

In Terms feeding it
['Sequence':'Sequence_Alias] => DB('Course', !Version, !Sequence, 'Seq_Code');
Will Error because Sequence_Alias is an attribute not an element.

The classic style feeder wouldn't work here since you would be WAY over feeding.
To drive to Tomok's point: You need to feed it something else to denote a value flag:
Or alternatively, if you don't want a sequence code or another value to flag it you could not feed it.

On the other hand if you just want a feeder that works for feeders sake:
['Seq_Code'] => DB('Sequence', !Version, !Sequence, 'Seq_Code');
I think is what you are looking for.
tomok
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: Rules - Feed dimension attribute to a measure cell

Post by tomok »

The point I was trying to make is that feeding is not necessary for what he wants to do, use the value as a lookup into another calculation. A non-fed, rule-calculated cell will still have a value, regardless of its status of being fed. The only thing feeding will do for him is to stop the Seq_Code measure from being zero suppressed when it is being used as a column or row header in a view or active form.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
nayitian
Posts: 26
Joined: Wed Apr 16, 2014 11:10 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: Rules - Feed dimension attribute to a measure cell

Post by nayitian »

Carl Lonsdale wrote:If I gather what you are trying to do correctly:
You would like to automatically feed the Sequence # FROM an Number Type Attribute named: 'Sequence_Alias' on the Dimension:Sequence to the Cube Value:
'Seq_Code' in Measure.

In Terms feeding it
['Sequence':'Sequence_Alias] => DB('Course', !Version, !Sequence, 'Seq_Code');
Will Error because Sequence_Alias is an attribute not an element.

The classic style feeder wouldn't work here since you would be WAY over feeding.
To drive to Tomok's point: You need to feed it something else to denote a value flag:
Or alternatively, if you don't want a sequence code or another value to flag it you could not feed it.

On the other hand if you just want a feeder that works for feeders sake:
['Seq_Code'] => DB('Sequence', !Version, !Sequence, 'Seq_Code');
I think is what you are looking for.

Hi, thanks so very much. This helps a lot, and it's exactly what I want to learn and know.
Post Reply