TI not writing string value to consolidated element

Post Reply
kenship
Regular Participant
Posts: 194
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: Planning Analytics 2.0.7
Excel Version: 2010

TI not writing string value to consolidated element

Post by kenship »

Hi all,

I have trouble writing to consolidated element of a cube. Here's some details of how I setup the TI process:

Data Source: Cube View - Target cube
Variables: Based on Target cube dimensions, Variable Type all "String", Contents all "Other"

Prolog:
1. Setup Target view and Target subset in Target cube
2. Setup Target subset using MDX that include leaf and consolidated elements for a few dimensions
3. Assign MDX of each dimension to Target subset
4. Assign Target subset to Target view
5. Activate ViewExtractSkipZeroesSet and ViewSuppressZeroesSet of Target View in Target Cube

Data:
CellPutS to Target Cube based on variables for each dimension. Content is referenced to another cube using CellGetS.

My problem is that it works fine for intersection on the leaf level but nothing is written to consolidated level elements as defined by the Target View and Target Subset.

Appreciate any help.

Kenneth
ascheevel
Community Contributor
Posts: 312
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: TI not writing string value to consolidated element

Post by ascheevel »

Make sure your TI source view isn't skipping consolidations: ViewExtractSkipCalcsSet?
kenship
Regular Participant
Posts: 194
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: Planning Analytics 2.0.7
Excel Version: 2010

Re: TI not writing string value to consolidated element

Post by kenship »

ascheevel wrote: Thu Oct 08, 2020 3:37 pm Make sure your TI source view isn't skipping consolidations: ViewExtractSkipCalcsSet?
Thanks for the reply. I checked the view and it does include the consolidated elements.

I've been testing by changing the CellPutS to special consolidated elements instead of variables and it worked. But I need the CellPut command to put content according to how the View is setup. I don't know if using variables is the right thing to do at all.

Kenneth
ascheevel
Community Contributor
Posts: 312
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: TI not writing string value to consolidated element

Post by ascheevel »

Post some code?
Wim Gielis
MVP
Posts: 3233
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1, Jedox
Version: PAL 2.1.5
Excel Version: Microsoft 365
Location: Brussels, Belgium
Contact:

Re: TI not writing string value to consolidated element

Post by Wim Gielis »

Did you look at ViewExtractSkipConsolidatedStringsSet ?
Best regards,

Wim Gielis

IBM Champion 2024-2025
Excel Most Valuable Professional, 2011-2014
https://www.wimgielis.com ==> 121 TM1 articles and a lot of custom code
Newest blog article: Deleting elements quickly
kenship
Regular Participant
Posts: 194
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: Planning Analytics 2.0.7
Excel Version: 2010

Re: TI not writing string value to consolidated element

Post by kenship »

Hi all,

For simplicity, I created a very small cube to show what I'm trying to accomplish.
The cube includes:
DimA - (A-TOTAL)->A1, A2
DimB- (B-TOTAL)->B1, B2
Dim_m- $, Description

What I'm trying to do is to put string into "Description" for consolidated elements (A-TOTAL), (B-TOTAL) when $ has value.
The image shows only leaf element has string value based on the CellPutS.
Screenshot 2020-10-08 134531.png
Screenshot 2020-10-08 134531.png (19.83 KiB) Viewed 3740 times
Here's my TI process

1. Data Source: Cube View, Demo->DimOrder
2. Variables: vDimA, vDimB, vDim_m, vValue, Variable Type: String, Contents: Other
3. Prolog:

Code: Select all

tCube = 'Demo';
tSubset = 'tsubset';
tView = 'tView';

IF(ViewExists(tCube, tView) = 1);
    ViewDestroy(tCube, tView);
ENDIF;
ViewCreate(tCube, tView);

vIndexDim = 1;
WHILE(TABDIM(tCube, vIndexDim) @<> '');
	vDimName = TABDIM(tCube, vIndexDim);

	IF(SubsetExists(vDimName, tSubset) = 1);
		SubsetDestroy(vDimName, tSubset);
	ENDIF;

	vMDX = '{TM1SUBSETALL( [' | vDimName | '])}';
	SubsetCreateByMDX(tSubset, vMDX);
	ViewSubsetAssign(tCube, tView, vDimName, tSubset);
	vIndexDim = vIndexDim +1;
END;

ViewExtractSkipZeroesSet(tCube, tView, 1);
ViewSuppressZeroesSet(tCube, tView, 1);

DatasourceCubeView = tView;
4. Data

Code: Select all

CellPutS('Check',tCube,vDimA,vDimB,'Description');
Again, this process put the text string "Check" into leaf element but not for consolidated level element.

Thanks!

Kenneth
ascheevel
Community Contributor
Posts: 312
Joined: Fri Feb 15, 2013 5:49 pm
OLAP Product: TM1
Version: PA 2.0.9.1
Excel Version: 365
Location: Minneapolis, USA

Re: TI not writing string value to consolidated element

Post by ascheevel »

Can you add the below items to your prolog below the other ViewExtract... declarations and re-test?

Code: Select all

ViewExtractSkipCalcsSet('tDemo', 'tView', 0);
ViewExtractSkipRuleValuesSet('tDemo', 'tView', 0);
kenship
Regular Participant
Posts: 194
Joined: Thu May 30, 2013 1:41 pm
OLAP Product: Cognos
Version: Planning Analytics 2.0.7
Excel Version: 2010

Re: TI not writing string value to consolidated element

Post by kenship »

Looks like it's the ViewExtractSkipCalcsSet that needs to be inserted.

Thanks very much!
ascheevel wrote: Thu Oct 08, 2020 6:16 pm Can you add the below items to your prolog below the other ViewExtract... declarations and re-test?

Code: Select all

ViewExtractSkipCalcsSet('tDemo', 'tView', 0);
ViewExtractSkipRuleValuesSet('tDemo', 'tView', 0);
Post Reply