|
Hi All,
I want to create Drill process to another cube. One of destinations cube elements have MDX subset, that's pointing another subset, to walkaround problem with deleteing subsets when they are useb by view (found on this forum).
Code: {[Dim].[Subset_for_recreation]}
Now i can delete Subset_for_recreation and use SubsetCreatebyMDX.
Code: # Deleting Subset if exists
If(SubsetExists('Acc', 'Subset_for_recreation')=1);
SubsetDestroy('Acc', 'Subset_for_recreation');
EndIf;
#Variable mapping
Position = '"*""' | DIMNM('PL',DIMIX('PL',PL)) | '""*"';
DummyElement = 'xyz"' | DIMNM('PL',DIMIX('PL',PL));
MDX = '{TM1FILTERBYPATTERN( {TM1SORT( {TM1FILTERBYLEVEL( {TM1SUBSETALL( [Acc] )}, 0)}, ASC)}, '|Position|')}';
#Adding dummy element to walkaround that values for filtering are on alias
DimensionElementInsert('PL', '',DummyElement,'N');
SubsetCreatebyMDX('PLDrill', MDX);
SubsetAliasSet('PL', 'PLDrill', 'PLPosition' );
DimensionElementDelete('PL',DummyElement);
My problem is that ElementInsert doesn't work like i want. I comment Creating subset and process works (it is adding element). Then I rerun drill (uncomented), and I'ts worked. I'm thinking that i have to save dimension before creating subset, but i don't known how to do it.
I'm working on Cognos Express 9.5 |
本帖子中包含更多资源
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
|