企业绩效管理网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 902|回复: 5

Im new and need help merging data from two dimension ...

[复制链接]

86

主题

396

帖子

584

积分

高级会员

Rank: 4

积分
584
QQ
发表于 2014-6-27 23:22:32 | 显示全部楼层 |阅读模式
Hello and thanks for helping me in advance!

I have worked before with Planning and now started learning TM1 which is whole different world.
I'm having probably a simple problem which I haven't yet worked out myself even though tried many times and wasted hours.

PROBLEM is that I have two cubes,
1. first cube got time dimensions separated as Months (Jan, Feb, ...) & Years (2008, 2009, ... 2020), and
2. second cube is formed with only one time dimension Years/Months (2008-01, 2008-02, ... 2016-12).
They both share the same item from which I'm bringing the data.

I have to bring calculated data back from cube one to cube two in this way (Jan, 2008) goes to (2008-01)
and so forth whole package all the way to the end of year 2016 with lots of data. Of course I could write single
code for every cell but I was hoping there was a more decent way to handle this.

Problem sorted here in matrix,
(1,1) (2,1) (3,1)
(1,2) (2,2) (3,2) CONVERSION ==> (1,1) (2,1) (3,1) (4,1) (5,1) (6,1) ... (9,1)
(1,3) (2,3) (3,3)

In my situation theres 156 cells of data.

Any suggestions gratefully received
J
回复

使用道具 举报

73

主题

406

帖子

585

积分

高级会员

Rank: 4

积分
585
发表于 2014-6-28 01:24:26 | 显示全部楼层
How are you planning to "bring" these data to your target cube? Do you want to physically copy the data using a TI process or do you want to use rules to pull data on demand in real time, physically keeping them in your source cube only?
回复 支持 反对

使用道具 举报

84

主题

399

帖子

588

积分

高级会员

Rank: 4

积分
588
QQ
发表于 2014-6-28 01:36:40 | 显示全部楼层
Thank you for replying.

This data is to be updated in real time and physically it can remain in the source cube but its also used in calculations in this cube. Am I making any sense?   

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

83

主题

421

帖子

617

积分

高级会员

Rank: 4

积分
617
QQ
发表于 2014-6-28 01:50:50 | 显示全部楼层
Its sounds like a fairly straightforward task.

Firstly, I would create an alias for the month dimension (let's call it "Numeric_Month") that would store "01" for Jan, "02" for Feb etc.

Then, your rule (in the target cube) should look something like this:

Code: &#91;<range the rule should work for>&#93; = N: DB ('source_cube', <some dimensions>, SUBST(!period,1,4), SUBST(!period,6,2), <some more dimensions> );
I'm assuming your single time dimension is called "period" in this case and am using the SUBST function to extract the year part and the (numeric) month part. Since numeric month is now an alias, TM1 is able to identify the right elements.

Provided your design is reasonable and you are using SKIPCHECK, you will also need to create a feeder statement in the SOURCE cube's rule file:

Code: &#91;<feeding range>&#93; => DB ('target_cube', <some dimensions>, !year | '-' | ATTRS ('month',!month,'Numeric_Month'), <some more dimensions>);

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

57

主题

378

帖子

507

积分

高级会员

Rank: 4

积分
507
发表于 2014-6-28 02:03:11 | 显示全部楼层
I tried different variations based on your suggestion but wasn't able to retrieve any values. I created alias for Months dimension like you told. In your versions !period is same as !year_months (elements: 2008-01, 2008-02..).

['Item1''] = N: DB('Production Plan', 'item1', !organization, SUBST(!year_months, 1, 4), SUBST(!year_months, 6,2));

I also flipped the SUBST commands other way around with the same end result. How does TM1 recognize to use SUBST commands as one dimension? If my year_months dimension got 2008-01 should this command return 2008 01 as value and spread the dimension with data for every cell it recognizes?
回复 支持 反对

使用道具 举报

58

主题

371

帖子

514

积分

高级会员

Rank: 4

积分
514
发表于 2014-6-28 02:28:30 | 显示全部楼层
I made a test cube and got it to work.

Thank you for the advices qml. I'll sort the rest out for myself.
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2020-6-7 10:03 , Processed in 0.255633 second(s), 12 queries , Memcache On.

Powered by Discuz! X3.1 Licensed

© 2001-2013 Comsenz Inc.

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