Page 1 of 1

Data Spread Failed - Erroneous Error Message?

Posted: Sun Apr 13, 2014 7:54 pm
by declanr
Had an interesting one today CX 10.1

Basic 4 dim cube with the following rule near the top of my rule sheet:

[]=S: DB ( 'Other Cube',.... Attrs ( 'Measures', !Measures, 'Rule_Detail' ) );

Underneath that I had a few rules based on specific numeric cells which worked perfectly.

In my cube view I also have some numeric elements for direct input, as expected these showed as white cells as opposed to grey but when I typed a number in I got the "Data Spread Failed" error message.

I changed my =S: rule to contain an If statement to check whether that measure has an attribute or not and if not it would just CONTINUE. Now the entry works fine; doesn't bother me too much as I immediately guessed what it would be - sadly so quickly that I didn't check to see whether I had an option to "Trace Calcs" on the cell but I assume it would have just shown the S: rule.

Just figured it was an interesting one to share with the forum as I couldn't find it after a quick scan on here, although that could just be because it returned so many genuine issues about dataspreading that I gave up looking.


EDIT - I do now recall an old post that I think DuncanP answered where there was something about N rules needing to be put before S rules when they applied to the same intersections but can't seem to find it - does that ring a bell to anyone?

Re: Data Spread Failed - Erroneous Error Message?

Posted: Mon Apr 14, 2014 4:18 am
by rmackenzie
declanr wrote:[]=S: DB ( 'Other Cube',.... Attrs ( 'Measures', !Measures, 'Rule_Detail' ) );
Syntactically, it's a little bit loose. As you have a string calculation, I assume you have a string measure in the dimension that is last in the cube. In which case, your rule would be better written as:

Code: Select all

['YOUR_STRING_MEASURE'] = S: DB ( etc ...
declanr wrote:EDIT - I do now recall an old post that I think DuncanP answered where there was something about N rules needing to be put before S rules when they applied to the same intersections but can't seem to find it - does that ring a bell to anyone?
I recall something similar in terms of advice. But, at the least, you shouldn't assume that an S: rule is auto-magically isolating only the string measures then you wouldn't (logically, if not practically) need to worry so much about the rule order.

Re: Data Spread Failed - Erroneous Error Message?

Posted: Mon Apr 21, 2014 9:17 pm
by declanr
rmackenzie wrote:
declanr wrote:[]=S: DB ( 'Other Cube',.... Attrs ( 'Measures', !Measures, 'Rule_Detail' ) );
Syntactically, it's a little bit loose. As you have a string calculation, I assume you have a string measure in the dimension that is last in the cube. In which case, your rule would be better written as:

Code: Select all

['YOUR_STRING_MEASURE'] = S: DB ( etc ...
declanr wrote:EDIT - I do now recall an old post that I think DuncanP answered where there was something about N rules needing to be put before S rules when they applied to the same intersections but can't seem to find it - does that ring a bell to anyone?
I recall something similar in terms of advice. But, at the least, you shouldn't assume that an S: rule is auto-magically isolating only the string measures then you wouldn't (logically, if not practically) need to worry so much about the rule order.
Sorry for the delay in responding to this one. I agree it's not the best syntax to not specify it in the left hand side but during development I sometimes don't know whether I will want my rule to apply to 1, 2 or umpteen elements, I got around this with the IF statement anyway as I tend to control a lot of rules via attributes and leaving the left hand side partly ambiguous to allow for future changes without having an overly stretched rule sheet just performing simple calcs.

As to the "auto-magically"... I would say it's not exactly me wanting TM1 to "auto-magically" work out what it applies to... I wanted it to apply to all of my string measures and hoped that the =S: would make that happen, in the same way that you can put =C: and not have it try and tackle your N level cells. Clearly there is something different going on in the background where string elements aren't quite as separate from numeric cells as the icons would try to have them appear (which I can't say is surprising.)

Either way, it was never really an issue, just thought it was an interesting one.

Re: Data Spread Failed - Erroneous Error Message?

Posted: Tue Apr 22, 2014 3:30 am
by rmackenzie
declanr wrote:As to the "auto-magically"... I would say it's not exactly me wanting TM1 to "auto-magically" work out what it applies to... I wanted it to apply to all of my string measures and hoped that the =S: would make that happen, in the same way that you can put =C: and not have it try and tackle your N level cells. Clearly there is something different going on in the background where string elements aren't quite as separate from numeric cells as the icons would try to have them appear (which I can't say is surprising.)
Strings are handled quite differently to numeric data-points. They don't consolidate, obviously. The require the special FEEDSTRINGS statements to generate feeders. Also they can't be referred to using the ['something'] syntax on the right-hand side of the rule; instead it is required to use the DB('cube','elem','string_measure') syntax. I suppose with all these differences they just have to be handled carefully in rules. Personally, as a default, I try to avoid rules on string data in large cubes.