Page 1 of 1

TI not writing string value to consolidated element

Posted: Thu Oct 08, 2020 3:23 pm
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

Re: TI not writing string value to consolidated element

Posted: Thu Oct 08, 2020 3:37 pm
by ascheevel
Make sure your TI source view isn't skipping consolidations: ViewExtractSkipCalcsSet?

Re: TI not writing string value to consolidated element

Posted: Thu Oct 08, 2020 3:52 pm
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

Re: TI not writing string value to consolidated element

Posted: Thu Oct 08, 2020 3:56 pm
by ascheevel
Post some code?

Re: TI not writing string value to consolidated element

Posted: Thu Oct 08, 2020 5:07 pm
by Wim Gielis
Did you look at ViewExtractSkipConsolidatedStringsSet ?

Re: TI not writing string value to consolidated element

Posted: Thu Oct 08, 2020 6:03 pm
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 289 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

Re: TI not writing string value to consolidated element

Posted: Thu Oct 08, 2020 6:16 pm
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);

Re: TI not writing string value to consolidated element

Posted: Thu Oct 08, 2020 6:41 pm
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);