企业绩效管理网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 918|回复: 4

Issue with creating subset via TI

[复制链接]

76

主题

356

帖子

534

积分

高级会员

Rank: 4

积分
534
QQ
发表于 2014-6-9 14:09:27 | 显示全部楼层 |阅读模式
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
回复

使用道具 举报

81

主题

424

帖子

616

积分

高级会员

Rank: 4

积分
616
QQ
发表于 2014-6-9 15:31:41 | 显示全部楼层
Dimensions are not "refreshed" until the tab the command is on is complete.

So if you are doing the dimension element insert on the prolog tab, and then you should do your create by mdx on the beginning of the epilog before the start of the generated statements and the return view handle statement

Edit so it makes sense!
回复 支持 反对

使用道具 举报

70

主题

437

帖子

587

积分

高级会员

Rank: 4

积分
587
QQ
发表于 2014-6-9 15:51:04 | 显示全部楼层
Thank you Steve. I suspected that I'm missing something simple...

--Edited--

I have checked this, and it's working but it's not enough for me. I want to make few steps, and Prolog and Epilog gives me only two. I tried to create nested processes (executing it from for example Prolog) hoping that data will be "refreshed" by the nested process, but this doesn't work. Any other way to do it?
回复 支持 反对

使用道具 举报

75

主题

385

帖子

554

积分

高级会员

Rank: 4

积分
554
QQ
发表于 2014-6-9 16:24:46 | 显示全部楼层
You would need to provide more detail on what you're trying to do to get a better reply, but here are my two eurocents.

Nested TIs should commit metadata when they finish. This does not apply to data when Parallel Interaction is switched on - all changes will be commited at the end of the parent process.

If you need more "steps" you can always try adding a dummy data source to the drill TI (e.g. with one record only) so that Data and Metadata tabs become active.

Another idea is to decouple the parent process from the children processes by using the command line executable RunTI.exe - I believe that this should force the children processes to commit all types of changes at the end of their execution.
回复 支持 反对

使用道具 举报

57

主题

378

帖子

507

积分

高级会员

Rank: 4

积分
507
发表于 2014-6-9 16:58:38 | 显示全部楼层
Thanks you all for replies. I have read more about MDX and manage to do what I want in two MDX based querys.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|企业绩效管理网 ( 京ICP备14007298号   

GMT+8, 2023-5-31 06:02 , Processed in 0.094555 second(s), 40 queries .

Powered by Discuz! X3.1 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表