Page 1 of 1
Attribute Rules
Posted: Wed Jun 18, 2008 10:57 am
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
Re: Attribute Rules
Posted: Wed Jun 18, 2008 11:47 am
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
Re: Attribute Rules
Posted: Wed Jun 18, 2008 12:02 pm
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?
Re: Attribute Rules
Posted: Wed Jun 18, 2008 12:38 pm
by Steve Vincent
probably the same good reason that rules work differently when run as a server and as a local host

Re: Attribute Rules
Posted: Wed Jun 18, 2008 1:03 pm
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
Re: Attribute Rules
Posted: Thu Jun 19, 2008 8:45 pm
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
Re: Attribute Rules
Posted: Thu Feb 19, 2015 7:15 pm
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