About rules for numbers and for string

Post Reply
EP_explorer
Regular Participant
Posts: 221
Joined: Sat Dec 04, 2010 2:35 pm
OLAP Product: PAL
Version: 2.0.9
Excel Version: 2016

About rules for numbers and for string

Post by EP_explorer »

I run against with the strange (for me) behaviour of rules for numbers and for strings.
For illustration:
1. I create 3 cubes with the same dimensions - Numbers (from 1 to 10), and Numb_Str (with elements - Numb (type is Number) and Strin (type is String)
1) Numb_str
2) Numb_str1
3) Numb_str2

2. I put rules in Numb_str1

Code: Select all

SKIPCHECK;
[ ]  = N: DB('Numb_str', !Numbers, !Numb_Str);
[ ]  = S: DB('Numb_str', !Numbers, !Numb_Str);
3. I put rules in Numb_str2

Code: Select all

SKIPCHECK;
[ ]  = N: DB('Numb_Str1', !Numbers, !Numb_Str);
[ ]  = S: DB('Numb_Str1', !Numbers, !Numb_Str);
4. Input numbers and strings in Numb_str Cube

The result of calculation you could see next (at left Cube Numb_str, at the middle - Numb_str1, at right - Numb_str2) :
01.jpg
01.jpg (57.08 KiB) Viewed 10444 times
So that is the problem with string rule? What I have to do to put String in the third cube?
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: About rules for numbers and for string

Post by jim wood »

So I take it your not feeding at all? You haven't used skipcheck?
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
EP_explorer
Regular Participant
Posts: 221
Joined: Sat Dec 04, 2010 2:35 pm
OLAP Product: PAL
Version: 2.0.9
Excel Version: 2016

Re: About rules for numbers and for string

Post by EP_explorer »

No - i didn't feed.

I only want to show numbers and strings (example is simple - in real life - task is more complicated of course) and I don't need to feed.
And also I don't want to calculate.

And it seems for strings - Tm1 allows that there is no string data in Numb_str1 - but why?
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: About rules for numbers and for string

Post by tomok »

You'll have to feed the strings in Numb_Str1 in order for them to carry forward into Numbr_Str2.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
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: About rules for numbers and for string

Post by lotsaram »

tomok wrote:You'll have to feed the strings in Numb_Str1 in order for them to carry forward into Numbr_Str2.
I wouldn't have thought that feeding would make any difference here. It should work without. Rule calculated string values are never cached and always calculated from scratch. At the point where the rule in Numb_str2 picks the value from the cell in Numb_str1 that cell should be evaluated which in turn should pull the original data entry value from the Numb_str cube.

Could be some weird issue with rule precedence and the N rule impeding the S rule. Have you tried either of these alternatives?
1/ Reverse the order of the N & S area qualifiers.

Numb_Str1

Code: Select all

[ ]  = S: DB('Numb_str', !Numbers, !Numb_Str);
[ ]  = N: DB('Numb_str', !Numbers, !Numb_Str);
Numb_Str2

Code: Select all

[ ]  = S: DB('Numb_Str1', !Numbers, !Numb_Str);
[ ]  = N: DB('Numb_Str1', !Numbers, !Numb_Str);
2/ Limit the area to only the relevant N or S area

Numb_Str1

Code: Select all

['Numb']  = N: DB('Numb_str', !Numbers, !Numb_Str);
['Strin']  = S: DB('Numb_str', !Numbers, !Numb_Str);
Numb_Str2

Code: Select all

['Numb']  = N: DB('Numb_Str1', !Numbers, !Numb_Str);
['Strin']  = S: DB('Numb_Str1', !Numbers, !Numb_Str);
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
BrianL
MVP
Posts: 264
Joined: Mon Nov 03, 2014 8:23 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2 PA2
Excel Version: 2016

Re: About rules for numbers and for string

Post by BrianL »

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: About rules for numbers and for string

Post by mattgoff »

Since it's working on the first set of rules and not on the second, it sure looks like a feeder issue to me. If you zero suppress, does the string column in the middle cube disappear? What happens if you remove the SKIPCHECK in your rules? If it works w/o SKIPCHECK, add some feeders (and a FEEDSTRINGS at top) and see if that works.

Matt
Please read and follow the Request for Assistance Guidelines. It helps us answer your question and saves everyone a lot of time.
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: About rules for numbers and for string

Post by lotsaram »

mattgoff wrote:Since it's working on the first set of rules and not on the second, it sure looks like a feeder issue to me. If you zero suppress, does the string column in the middle cube disappear? What happens if you remove the SKIPCHECK in your rules? If it works w/o SKIPCHECK, add some feeders (and a FEEDSTRINGS at top) and see if that works.

Matt
Matt, (& Tom, Jim)... look at the cubes. 2D with all leaf cells. It can't be a feeding issue because feeding drives consolidation of rule calculated values, nothing else. When querying a single cell the value should still be returned regardless of whether a cell is fed or not. Besides strings don't consolidate, the one and only reason to feed a string rule is for it to display in a zero suppressed view.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
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: About rules for numbers and for string

Post by mattgoff »

You're right, Lotsa. I just built this in TM1 10.2.2 FP1 (10.2.20100.123), and it works as intended. I think this one can be chalked up to a bug in EP_explorer's version (10.1.1 based on profile). At the risk of being accused of being an IBM support sleeper agent: upgrade to latest version.
1.gif
1.gif (17.24 KiB) Viewed 10350 times
Please read and follow the Request for Assistance Guidelines. It helps us answer your question and saves everyone a lot of time.
blackhawk
Community Contributor
Posts: 136
Joined: Thu May 29, 2008 2:29 pm

Re: About rules for numbers and for string

Post by blackhawk »

Well, you got my curiosity up, so I checked it out on my version (10.2.2) and it seems to work fine.
Screenshot.png
Screenshot.png (17.89 KiB) Viewed 10349 times
BrianL
MVP
Posts: 264
Joined: Mon Nov 03, 2014 8:23 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2 PA2
Excel Version: 2016

Re: About rules for numbers and for string

Post by BrianL »

I just checked my copy of 10.1.1 fp2 and it seems to work fine there too.
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: About rules for numbers and for string

Post by rmackenzie »

lotsaram wrote: 2/ Limit the area to only the relevant N or S area

Numb_Str1

Code: Select all

['Numb']  = N: DB('Numb_str', !Numbers, !Numb_Str);
['Strin']  = S: DB('Numb_str', !Numbers, !Numb_Str);
IMO this is the correct approach although it's going to be a problem in a moving dimension where you aren't sure what new string elements have been added. I've seen a problem where there seems to be confusion in the results where S: rules at the leaf level of the cube not calculating when there was an N: rule applying to the same intersection. It's probably always worth it to try to be specific as possible on the left-hand side of the rule.
Robin Mackenzie
EP_explorer
Regular Participant
Posts: 221
Joined: Sat Dec 04, 2010 2:35 pm
OLAP Product: PAL
Version: 2.0.9
Excel Version: 2016

Re: About rules for numbers and for string

Post by EP_explorer »

You know

Code: Select all

SKIPCHECK;
['Numb' ]  = N: DB('Numb_Str1', !Numbers, !Numb_Str);
['Strin' ]  = S: DB('Numb_Str1', !Numbers, !Numb_Str);
works

Also I check in 10.2.1 and

Code: Select all

SKIPCHECK;
[ ]  = N: DB('Numb_str1', !Numbers, !Numb_st);
[ ] = S: DB('Numb_str1', !Numbers, !Numb_st);
works as well
rmackenzie
MVP
Posts: 733
Joined: Wed May 14, 2008 11:06 pm

Re: About rules for numbers and for string

Post by rmackenzie »

Yep, both ways ways are syntactically OK but sometimes the latter stuffs up. Its going to depend on all the other rules and interlinking cubes and so forth. Its still worthwhile keeping the hand side as tight as possible.
Robin Mackenzie
User avatar
jim wood
Site Admin
Posts: 3961
Joined: Wed May 14, 2008 1:51 pm
OLAP Product: TM1
Version: PA 2.0.7
Excel Version: Office 365
Location: 37 East 18th Street New York
Contact:

Re: About rules for numbers and for string

Post by jim wood »

lotsaram wrote: Matt, (& Tom, Jim)... look at the cubes. 2D with all leaf cells. It can't be a feeding issue because feeding drives consolidation of rule calculated values, nothing else. When querying a single cell the value should still be returned regardless of whether a cell is fed or not. Besides strings don't consolidate, the one and only reason to feed a string rule is for it to display in a zero suppressed view.
I only asked if he was feeding or skipcheck switched to try and narrow the issue down. I didn't say that feeding was the issue, but hey ho.
Struggling through the quagmire of life to reach the other side of who knows where.
Go Build a PC
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
Post Reply