Page 1 of 1

Accumulation of multiple values in different items to the same target area

Posted: Fri Sep 02, 2016 1:40 pm
by rsnrekha
Hello,

Here i am with one more question!

Have to achieve the accumulation of data, where source cube has picklist and in target the picklist items are in one of the of real dimension.

It is easy to move data when you have one picklist item in source with string comparison using IF statement.

But in current case we have three picklist items (Business function requirement) and all have same dimension assigned to them. In target it is only one dimension against which i have to move the data.

So rule should be
1) 1st Picklist: Move all matching string data to Target instance
2) 2nd Picklist: If Target has non zero values for matched strings, then Add the source data, else fill with source data
3) 3rd Picklist: If Target has non zero values for matched strings, then Add the source data, else fill with source data

However the rule is not working, or something is wrong in rule. Not able to figure out.

Attaching the screenshot document for the same, please guide.

Somewhere it is wrong or the method i m doing is wrong. Is there any other way to achieve the functionality?

Thanks in advance!
R

Re: Accumulation of multiple values in different items to the same target area

Posted: Fri Sep 02, 2016 4:14 pm
by tomok
Picklist values are strings. In your rule code you are looking at a picklist populated cell and doing a numeric comparison ('HF DCG1' <>0) when you should do a string comparison ( 'HF DCG1' @<> '').

Re: Accumulation of multiple values in different items to the same target area

Posted: Fri Sep 02, 2016 7:44 pm
by rsnrekha
Thanks Tom. However the problem is my second rule statement is passing false result only.
If you look at the last screenshot in the document, Test1 has volume data in HF DCG2 & HFG Volume 2. And Target already holds data in the area, rather than adding, it is just giving the false result.

What is wrong in my rule? Or is it not the right way of doing it?

Thanks !

Re: Accumulation of multiple values in different items to the same target area

Posted: Sat Sep 03, 2016 11:16 pm
by Wim Gielis
As Tom said, look at the 1st and 4th line in the rules.
How can you compare the choice in a picklist (which is text) to the number 0 ?
Ca you explain that to us ?

Re: Accumulation of multiple values in different items to the same target area

Posted: Sun Sep 04, 2016 9:04 am
by rsnrekha
Hi,

Thanks for your responses.
Yes i have made changes accordingly,

[]=N:IF(DB('Test1',!Store_test,!Volume_test,'HF DCG1')@<>''
& DB('Test1',!Store_test,!Volume_test,'HF DCG1')@=DIMNM('DCG_test',DIMIX('DCG_test', !DCG_test)),
DB('Test1',!Store_test,!Volume_test,'HF DCG1 Volume'),
Continue);

[]=N:IF(DB('Test1',!Store_test,!Volume_test,'HF DCG2')@<>''
& DB('Test1',!Store_test,!Volume_test,'HF DCG2')@=DIMNM('DCG_test',DIMIX('DCG_test', !DCG_test)),
IF(DB('Test2',!Store_test,!DCG_test,!Volume_test)<>0,DB('Test2',!Store_test,!DCG_test,!Volume_test)+DB('Test1',!Store_test,!Volume_test,'HF DCG2 Volume'), 11 ),
1);

Still it does not work, fullfill my requirement of adding the value to target if there is any value for the combination already.
Could you please guide me where m i doing wrong? Is the True statement of second rule is not correct?

Thanks and Regards

Re: Accumulation of multiple values in different items to the same target area

Posted: Sun Sep 04, 2016 10:19 am
by Wim Gielis
Please right-click a cell and use "Trace calculation". Then it should be clear what is going on. If needed replace parts of the rule(s) with hard coded results to debug them more easily.

Re: Accumulation of multiple values in different items to the same target area

Posted: Sun Sep 04, 2016 1:23 pm
by rsnrekha
Hi Everyone !
Thanks for your responses.
Have been able to solve the issue, The problem was with the logic i was writing including too many complex conditions.
Instead broke it down to simple segments by adding two elements in the source cube.

Here is the final rule and cube structure.

Re: Accumulation of multiple values in different items to the same target area

Posted: Sun Sep 04, 2016 1:43 pm
by Wim Gielis
Good !