CellGetS fails to retrieve calculated string values

Post Reply
Guillaume Galtier
Posts: 40
Joined: Thu Jun 19, 2008 8:09 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

CellGetS fails to retrieve calculated string values

Post by Guillaume Galtier »

Hi everybody,

I'm facing strange issues with CellGetS in a TI process.

When i'm trying to retrieve a String value using CellGetS from my TI, it returns empty string.
The value I want to retrieve is calculated by rule.

My model is very simple:
  • - 1 cube with 3 dimensions (Version, Dim1, Dim2).
    The third dimension (Dim2) contains Numeric and String elements.

    - 1 rule to calculate a version from another version
    • MyCalcVersion = N: MySourceVersion
      MyCalcVersion = S: MySourceVersion
    Feeders ar set, and Feedstrings statement is the first instruction of my rule.
From my TI, the CelGetS function works fine if I try to retrieve a value from MySourceVersion, but fails to retrieve values from MyCalcVersion (no errors, just returns empty string).
CellGetN works fine for the 2 versions.

Any idea why CellGetS fails to retrieve calculated string values ?

Thanks in advance ! :)
Guillaume
User avatar
jim wood
Site Admin
Posts: 3958
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: CellGetS fails to retrieve calculated string values

Post by jim wood »

I can only guess that it is a feeder issue. Have you tested your feeders on the cube where you are getting the value from?
Struggling through the quagmire of life to reach the other side of who knows where.
Shop at Amazon
Jimbo PC Builds on YouTube
OS: Mac OS 11 PA Version: 2.0.7
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: CellGetS fails to retrieve calculated string values

Post by David Usherwood »

My guess is that you have written

Code: Select all

['MyCalcVersion'] = N: ['MySourceVersion'];
['MyCalcVersion'] = S: ['MySourceVersion'];
when you need to write

Code: Select all

['MyCalcVersion'] = N: ['MySourceVersion'];
['MyCalcVersion'] = S: db('MyCube','MySourceVersion',!Dim1,!Dim2);
You can't use ['...'] references to pick up string values.
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: CellGetS fails to retrieve calculated string values

Post by Duncan P »

Regardless of any other reason, the S: needs to be first. See http://www.tm1forum.com/viewtopic.php?t=7146.
Guillaume Galtier
Posts: 40
Joined: Thu Jun 19, 2008 8:09 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: CellGetS fails to retrieve calculated string values

Post by Guillaume Galtier »

Thank you all for your replies !
David Usherwood wrote:My guess is that you have written

Code: Select all

['MyCalcVersion'] = N: ['MySourceVersion'];
['MyCalcVersion'] = S: ['MySourceVersion'];
when you need to write

Code: Select all

['MyCalcVersion'] = N: ['MySourceVersion'];
['MyCalcVersion'] = S: db('MyCube','MySourceVersion',!Dim1,!Dim2);
You can't use ['...'] references to pick up string values.
Sorry for the poor syntax of my rule, I just simplified it, writing my post.
I of course used ['..'] and the DB(...) to pick up string values.

I checked the Feeders, and it looks good.

I post hereunder my "true" rule and the associated feeders, it may help finding my issue... ;)

Code: Select all

# LIVE versions & Multi-Program versions
[] = N: IF(SUBST(!Version MSN, 4, 5) @= '_LIVE' % ELISANC('Version MSN', 'PPT', !Version MSN) = 1,
			DB('Assumptions MSN', ATTRS('Version MSN', !Version MSN, 'Link ' | ELPAR('MSN', !MSN, 1)), !MSN, !KF MSN),
			CONTINUE
		);

[] = S: IF(SUBST(!Version MSN, 4, 5) @= '_LIVE' % ELISANC('Version MSN', 'PPT', !Version MSN) = 1,
			DB('Assumptions MSN', ATTRS('Version MSN', !Version MSN, 'Link ' | ELPAR('MSN', !MSN, 1)), !MSN, !KF MSN),
			CONTINUE
		);

FEEDERS;

# Versions LIVE
# -- Last Closing Reference (PLA_LIVE)
[] => DB('Assumptions MSN', IF(!Version MSN @= ATTRS('Version MSN', 'PPA_LIVE', 'Link ' | ELPAR('MSN', !MSN, 1)), 'PPA_LIVE', 'No Feed'), !MSN, !KF MSN);

# -- Last Planning Reference (PLT_LIVE)
[] => DB('Assumptions MSN', IF(!Version MSN @= ATTRS('Version MSN', 'PPT_LIVE', 'Link ' | ELPAR('MSN', !MSN, 1)), 'PPT_LIVE', 'No Feed'), !MSN, !KF MSN);

# Versions Multi-Programs
[] => DB('Assumptions MSN', IF(SUBST(!Version MSN, 4, 5) @<> '_LIVE' & ELISANC('Version MSN', 'PPT', !Version MSN) = 0 & ELISANC('Version MSN', 'PPA', !Version MSN) = 0, 'PPT', 'No Feed'), !MSN, !KF MSN);

Guillaume Galtier
Posts: 40
Joined: Thu Jun 19, 2008 8:09 am
OLAP Product: TM1
Version: 10.2.2
Excel Version: 2010

Re: CellGetS fails to retrieve calculated string values

Post by Guillaume Galtier »

Duncan P wrote:Regardless of any other reason, the S: needs to be first. See http://www.tm1forum.com/viewtopic.php?t=7146.
And the winner is Duncan !! :D

I've just inverted the N: and S: rules and now CellGetS in my TI process returns the good values.

Thank you !!

Guillaume
Post Reply