Feeder with dimix?

Post Reply
Kazêh
Posts: 44
Joined: Fri Apr 19, 2013 12:59 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Feeder with dimix?

Post by Kazêh »

Hi all, im trying to write a feeder, and i kinda need to know if is if posible to use dimix function on feeders.

i have 2 cubes, and in the second one i have the same dimension as the cube1 but with another name, but the exact same elements.
I'm not very familiar with the function dimix, but i saw some generated rule with performance modeler and they do something like this to validate the elements

in cube1 i have DimensionX
and cube2 i have DimensionZ that is the same as DImensionX but with a diferent name.


['Measue']= N: if(dimix('DimensionX',!DimensionZ)<>0, DB('Cube2',!DimensionZ,!Dim1,!Dim2,!Dim3),CONTINUE);

with this i can validate the elements , because they have the same index as the cube 1.


in Cubo2 i have some multiplication, and that data is coming from Cube1, then I want to make a feeder for cubo1, but I have the problem that the name of the dimension is different, so I want to use dimix
i do not know if you understand me, hope you get the idea..sorry for my bad english tho.

what i did was this:

['Measure']=> if(DIMIX('DimensionX,!DimensionZ)<>0,DB('Cube2',!DimensionZ,!Dim1,!Dim2,!Dim3),CONTINUE);

but with no good results.

if someone has any experecien with this, pls let me know, any tip will be appreciated
Thanks :)
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Feeder with dimix?

Post by David Usherwood »

You don't need to use dimix. When writing rules or feeders across cubes, dimension elements which match will link and unmatched elements will fail silently. Note you can't use CONTINUE in a feeder.
I'd say, therefore

Code: Select all

['Measue']= N: DB('Cube2',!DimensionZ,!Dim1,!Dim2,!Dim3);
and 
['Measure']=> DB('Cube2',!DimensionZ,!Dim1,!Dim2,!Dim3);
would work fine.
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Feeder with dimix?

Post by tomok »

It's hard to help because you haven't specified in which cubes these actual rule statements are housed. It's like your first statement would be in Cube 1 because you are trying to pull in values from Cube2, however, your rule is using the !DimensionZ syntax a couple of times and that is not valid in Cube1 because DimensionZ is not in that cube. Everything seems to be mish-mashed together and I can't tell what's going on.

That being said, why do you think you even need to use DIMIX? If the two dimensions are identical then just use the name. If an element or two doesn't match then it will be skipped, much like a JOIN in SQL.

Rule in Cube 1:

Code: Select all

['Measue']= N: DB('Cube2',!DimensionX,!Dim1,!Dim2,!Dim3);
Rule in Cube 2:

Code: Select all

['Measure']=> ('Cube1',!DimensionZ,!Dim1,!Dim2,!Dim3);
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
java_to_tm1
Posts: 33
Joined: Mon Sep 23, 2013 3:24 pm
OLAP Product: TM1
Version: 10.2
Excel Version: Excel 2010

Re: Feeder with dimix?

Post by java_to_tm1 »

Tom's code snippet should do the trick.

But I've always wondered about the need for creating a copy of a dim with exactly the same elements:
Kazêh wrote: i have the same dimension as the cube1 but with another name, but the exact same elements.
I can understand there's a valid case for doing this if you have an "approval" type application built on that dim (You would need a copy of the dim for cubes that shouldnt have approval hierarchy).

I've also seen cases where there are two (or more) time dimensions (with possible different levels of granularity).

Just curious if there are any typical cases where you'd need an exact copy of a dim.

(different thread perhaps?)
The Java_to_TM1 Convert
TM1 Version 10.1, 10.2, Cognos Insight 10.1, 10.2
Local: Windows 7 Professional, Excel 2007
Server: Windows Server 2008 64-bit
p.s. I have a healthy disregard for Performance Muddler.
Sebastian.Klein
Posts: 16
Joined: Mon Oct 15, 2012 3:49 pm
OLAP Product: TM1
Version: 10.2
Excel Version: 2010

Re: Feeder with dimix?

Post by Sebastian.Klein »

Kazêh wrote: what i did was this:

['Measure']=> if(DIMIX('DimensionX,!DimensionZ)<>0,DB('Cube2',!DimensionZ,!Dim1,!Dim2,!Dim3),CONTINUE);

but with no good results.
Although I agree with the other posters, I will let you know which is the right code for a conditional feeder:

Code: Select all

['Measure'] => DB( If (condition, 'CubeName', ''), !Dim1, !Dim2, ...);
It is not very intuitive, but once you understand how it works, you will remind it the next time ;)
German TM1 Consultant since 2008
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Feeder with dimix?

Post by tomok »

Sebastian.Klein wrote:Although I agree with the other posters, I will let you know which is the right code for a conditional feeder:
Yes, but the point here is that you do not need a conditional feeder. If you have two dimensions A and B, in different cubes, and they have overlapping members then doing this:

Code: Select all

[All the stuff from Cube 1]=>DB(Cube 2, !DimB.....)
Then only those members in DimB that match an element in DimA will get fed. It already is conditional, there is no need to do a DIMIX check and then an IF statement.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Kazêh
Posts: 44
Joined: Fri Apr 19, 2013 12:59 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: Feeder with dimix?

Post by Kazêh »

Thanks for all the answers.

Normally do not post the original code because I feel that if I did, it would be like asking you guys to solve my problem, and what I want are tips and try to learn to do it alone. also there are people who get angry if you ask them...and they send me to read the manual again, and come when am a litle wiser...so!:

As someone says, I can not use the same dimension because I'm using it as a dimension of hierarchy in different applications.
The real rule is a litle more complex, i will post it right away:

Code: Select all


['Devengacion']= N: If(DIMIX('Gerencias Tecnicas RRC',!Gerencias Tecnicas RRC UPA)<>0,DB('Primas UPA RRC',!Gerencias Tecnicas RRC UPA,!Mes Emision,!Ramo,!Canal,'UF','UPA1')  *(1- ( (dayno(!Tiempo)-dayno(DB('Calculo RRC UPA Part 1',!Gerencias Tecnicas RRC UPA,!Mes Emision,!Canal,!Ramo,!Metricas RRC,'Fecha Aux')))/ DB('Calculo RRC UPA Part 1',!Gerencias Tecnicas RRC UPA,!Mes Emision,!Canal,!Ramo,!Metricas RRC,'Vigencia Promedio')))*  (1-DB('Calculo RRC UPA Part 1',!Gerencias Tecnicas RRC UPA,!Mes Emision,!Canal,!Ramo,!Metricas RRC,'Comision Directa')),CONTINUE);

im really not good at writin complex feeders, i dont know if this is complex or not, but i always try to follow the example ['B']= ['A']*['C']; ['A']=> ['B'] , ['A']=> ['C]
and separate the calculations into blocks and see if I can build something

A* (B(1)/B(2))* C

I'm basically multiplying a value from cube "Primas UPA RRC", then a division between a date and a few days of validity and then multiply it by a percentage, that's on simple words.
im still trying to pull this out, i will take your tips and let you know as soon as posible if it's working or not.


Thank you all for your support
Kazêh
Posts: 44
Joined: Fri Apr 19, 2013 12:59 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007

Re: Feeder with dimix?

Post by Kazêh »

i did it guys, i write a feeder in cube Calculo RRC UPA part 1 like this:

['Fecha Aux']=>DB('Calculo RRC UPA Part 2',!Canal,'Devengacion',!Gerencias Tecnicas RRC UPA,!Ramo,'TOTAL',!Mes Emision,!Metricas RRC);

and i worked perfectly. Thanks for all your tiips, sorry the trouble.

thread Closed
Post Reply