Attribute Rules

Post Reply
User avatar
John Hobson
Site Admin
Posts: 330
Joined: Sun May 11, 2008 4:58 pm
OLAP Product: Any
Version: 1.0
Excel Version: 2020
Location: Lytham UK
Contact:

Attribute Rules

Post by John Hobson »

Hi

Should I be able to create a rule in an attribute cube as follows?

['LeadTimeWeeks'] = N: ['LeadTimeDays'] \ 7;
['LeadTimeWeeks'] = C: 0;
['LeadTimeDays'] = C: 0;

All 3 targets are numeric attributes.
The rule appears to compile from Excel
The rule is clearly present in the rule editor

The target cells are white and empty in cube viewer. :(

Is there something about attribute cubes that stops you performing calculations like this?

Cheers

John
John Hobson
The Planning Factory
User avatar
mattgoff
MVP
Posts: 518
Joined: Fri May 16, 2008 1:37 pm
OLAP Product: TM1
Version: 10.2.2.6
Excel Version: O365
Location: Florida, USA

Re: Attribute Rules

Post by mattgoff »

John Hobson wrote:Is there something about attribute cubes that stops you performing calculations like this?
Yup, I believe cells in attribute cubes behave like strings, no matter the element type. If you need to do math, make a regular cube instead of using attributes.

Matt
Please read and follow the Request for Assistance Guidelines. It helps us answer your question and saves everyone a lot of time.
User avatar
John Hobson
Site Admin
Posts: 330
Joined: Sun May 11, 2008 4:58 pm
OLAP Product: Any
Version: 1.0
Excel Version: 2020
Location: Lytham UK
Contact:

Re: Attribute Rules

Post by John Hobson »

Cheers Matt - I had a vague memory of that but it's good to have it confirmed.

It does beg the questions "Why?" and "Why have a numeric attribute type at all?" though.

I always thought that attribute cubes were just normal 2d cubes that were exposed to the subset editor, but maybe there's a good reason for treating them differently as regards rules?
John Hobson
The Planning Factory
User avatar
Steve Vincent
Site Admin
Posts: 1054
Joined: Mon May 12, 2008 8:33 am
OLAP Product: TM1
Version: 10.2.2 FP1
Excel Version: 2010
Location: UK

Re: Attribute Rules

Post by Steve Vincent »

probably the same good reason that rules work differently when run as a server and as a local host ;)
If this were a dictatorship, it would be a heck of a lot easier, just so long as I'm the dictator.
Production: Planning Analytics 64 bit 2.0.5, Windows 2016 Server. Excel 2016, IE11 for t'internet
User avatar
Eric
MVP
Posts: 373
Joined: Wed May 14, 2008 1:21 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003
Location: Chicago, IL USA

Re: Attribute Rules

Post by Eric »

I came across the same problem. The consensus was Attribute cubes are to hold descriptive data, not information. As pointed out, only "string" data even if it is a numeric. That is part of the reason why numeric values do not consolidate in an attribute cube. The only reason it allows for string and numeric in an attribute is so you can reference the attribute in a rule and not have to suck up memory converting every attribute cell to numeric aka NUMBR().

HTH
Regards,
Eric
Blog: http://tm1-tipz.blogspot.com
Articles: http://www.google.com/reader/shared/use ... /label/TM1


Production: 32 bit 9.0 SP2, Windows 2000 Advanced Server. Web: 32 bit 9.0 SP2, Windows 2000 Server. Excel 2003
User avatar
Martin Ryan
Site Admin
Posts: 2003
Joined: Sat May 10, 2008 9:08 am
OLAP Product: TM1
Version: 10.1
Excel Version: 2010
Location: Wellington, New Zealand
Contact:

Re: Attribute Rules

Post by Martin Ryan »

If you use the "DTYPE" formula in Excel (or in VBA anyway, where I tried it) on an element in an attribute dimension it returns something other than "S" or "N". It returns either "AS" and "AN".

Effectively numeric attributes are a crossover between strings and numeric, so they're neither and both.

Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
User avatar
PavoGa
MVP
Posts: 622
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.9.1
Excel Version: 2013 PAW
Location: Charleston, Tennessee

Re: Attribute Rules

Post by PavoGa »

You can have a rule on an attribute cube update numeric attributes properly by not using the = N: syntax.

['LeadTimeWeeks'] = ['LeadTimeDays'] \ 7;

Not sure how to deal with consolidations, I did not have to work that out, but I can get the above to work on simple elements.

Ty
Ty
Cleveland, TN
Post Reply