Page 1 of 1

A circular reference

Posted: Mon Apr 20, 2015 5:54 am
by kidyee
Hi guys. I want to avoid message that " A circular reference was detected compiling dimension"

I want to show that immediately below
== This is element in Dimension ==
(C)Total
├(c)Finance
│ ├(n)CFO
│ ├(n)CFO Office
│ ├(n)Accounting
│ ├(n)Controlling
│ └(n)Treasury
└(n)Fixed Opex


and then Raw Data Like below
NameGroupSum
CFOFinanceTotal
CFO OfficeFinanceTotal
AccountingFinanceTotal
ControllingFinanceTotal
ITMD OfficeTotal
TreasuryFinanceTotal
HRMD OfficeTotal
AdminMD OfficeTotal
Fixed OpexTotalTotal
How do I avoid error message? (,"Fixed Opex","Total","Total",Data Source line (28) Error: MetaData procedure line (7): A circular reference was detected compiling dimension "COM_OPEX Costcenter".)

thanks for reading my post.
ps. I'm not very good at English. you are understands me

Re: A circular reference

Posted: Mon Apr 20, 2015 6:12 am
by BariAbdul
Hi gays
Firstly,It should be guys,right?

Please go through below link,It might help:

http://www.tm1forum.com/viewtopic.php?p=22755
http://www.tm1forum.com/viewtopic.php?p=8275
Thanks :)

Re: A circular reference

Posted: Mon Apr 20, 2015 7:35 am
by kidyee
BariAbdul wrote:
Hi gays
Firstly,It should be guys,right?

Please go through below link,It might help:

http://www.tm1forum.com/viewtopic.php?p=22755
http://www.tm1forum.com/viewtopic.php?p=8275
Thanks :)
Thanks
BariAbdul wrote: The "guys" was changed to "gays" by your advice. But I don't slove my problem.

Your Link URLs are different to my problem.

My dimention have 3 Level (0, 1, 2) .
"0 level" is leaf.
"1 Level" is consolidation and It have Level "0".
And Last one is Top consolidation and It have Level "1"
But last of data of raw is Fixed Opex that is Level "0" and "Total" is Level "2"

I want to auto-make Dimention on TI per month.
But last row data was occoured error. because. have same charactar "Total"

"Fixed Opex" "Total" "Total"

I want to keep below Dimension structor
(C)Total
├(c)Finance
│ ├(n)CFO
│ ├(n)CFO Office
│ ├(n)Accounting
│ ├(n)Controlling
│ └(n)Treasury
└(n)Fixed Opex

so how do I make raw data or do for TI configuration.

thanks for reading my repost.
ps. I'm not very good at English. you might be understands me.

Re: A circular reference

Posted: Mon Apr 20, 2015 8:27 am
by tm1ist
Try deleting one of the 'Total's from the last row. If that does not work, you should probably modify your TI process code. You can post the TI code here so we may help further.

Re: A circular reference

Posted: Mon Apr 20, 2015 8:45 am
by rmackenzie
For a ragged hierarchy, the preference is to use a Parent, Child structure in the input source. E.g.:
ParentChild
CFOFinance
CFO OfficeFinance
AccountingFinance
ControllingFinance
TreasuryFinance
Fixed OpexTotal
FinanceTotal

Re: A circular reference

Posted: Mon Apr 20, 2015 9:04 am
by kidyee
tm1ist wrote:Try deleting one of the 'Total's from the last row. If that does not work, you should probably modify your TI process code. You can post the TI code here so we may help further.
Thanks for answer and read my post.
It had been occoured error massage as ever when I was tring (but It worked well)

The Goal is do not occored error massage and well worked

Re: A circular reference

Posted: Mon Apr 20, 2015 9:10 am
by kidyee
rmackenzie wrote:For a ragged hierarchy, the preference is to use a Parent, Child structure in the input source. E.g.:
ParentChild
CFOFinance
CFO OfficeFinance
AccountingFinance
ControllingFinance
TreasuryFinance
Fixed OpexTotal
FinanceTotal
Thanks for answer and read my post.
But My customer give me a raw data include 3 culumns

That raw data came form SAP System .

Re: A circular reference

Posted: Mon Apr 20, 2015 9:30 am
by rmackenzie
kidyee wrote:Thanks for answer and read my post.
But My customer give me a raw data include 3 culumns

That raw data came form SAP System .
TM1 requires that all elements ( c-level or n-level) are uniquely named. Your source file does not comply with that requirement. Your options are to redefine the source file (Parent, Child format) or code for the fact that the source file is not in the structure that will align to the system requirement.

I assume you are using the TI wizard/ 'Maps' tab because you have not posted any code that shows you are trying to solve the problem per TM1 requiring unique names?

Re: A circular reference

Posted: Mon Apr 20, 2015 8:23 pm
by tm123
If you're not using the wizard, then it's easy to resolve this issue. Looking at your sample data, your source file contains 3 columns, which in most cases represent a child-parent-grandparent relationship.
So in your metadata tab, with the assumption that you have 3 variables named (vElement, vParent, vGrandParent) then your code should look like:

IF ( vElement @<> '' ) ;
DIMENSIONELEMENTINSERT ( sDimName,'', vElement ,'N' );
ENDIF ;

IF ( vParent @<> '' ) ;
DIMENSIONELEMENTINSERT ( sDimName,'', vParent ,'C' );
ENDIF ;

IF ( vGrandParent @<> '' ) ;
DIMENSIONELEMENTINSERT ( sDimName,'', vGrandParent ,'C' );
ENDIF ;


IF ( vElement @<> vParent ) ;
DIMENSIONELEMENTCOMPONENTADD ( sDimName , vParent , vElement , 1 ) ;
ENDIF ;

IF ( vParent @<> vGrandParent ) ;
DIMENSIONELEMENTCOMPONENTADD ( sDimName , vGrandParent , vParent , 1 ) ;
ENDIF ;

Re: A circular reference

Posted: Tue Apr 21, 2015 12:59 am
by kidyee
tm123 wrote:If you're not using the wizard, then it's easy to resolve this issue. Looking at your sample data, your source file contains 3 columns, which in most cases represent a child-parent-grandparent relationship.
So in your metadata tab, with the assumption that you have 3 variables named (vElement, vParent, vGrandParent) then your code should look like:

IF ( vElement @<> '' ) ;
DIMENSIONELEMENTINSERT ( sDimName,'', vElement ,'N' );
ENDIF ;

IF ( vParent @<> '' ) ;
DIMENSIONELEMENTINSERT ( sDimName,'', vParent ,'C' );
ENDIF ;

IF ( vGrandParent @<> '' ) ;
DIMENSIONELEMENTINSERT ( sDimName,'', vGrandParent ,'C' );
ENDIF ;


IF ( vElement @<> vParent ) ;
DIMENSIONELEMENTCOMPONENTADD ( sDimName , vParent , vElement , 1 ) ;
ENDIF ;

IF ( vParent @<> vGrandParent ) ;
DIMENSIONELEMENTCOMPONENTADD ( sDimName , vGrandParent , vParent , 1 ) ;
ENDIF ;

DIMENSIONELEMENTCOMPONENTADD(sDimName,cTotalEmployee , vEmployeeLevel , 1.000000);
Thanks for your kindy explanation.
My TI problem is solved clearly by your advice.

in my case I changed
DIMENSIONELEMENTCOMPONENTADD(sDimName,cTotalEmployee , vEmployeeLevel , 1.000000) to
DIMENSIONELEMENTCOMPONENTADD('COM_OPEX Costcenter',vParent ,vElement ,1.000000)

And now There is no error and worked well.
really really Thanks so much.

Re: A circular reference

Posted: Tue Apr 21, 2015 1:04 am
by kidyee
rmackenzie wrote:
kidyee wrote:Thanks for answer and read my post.
But My customer give me a raw data include 3 culumns

That raw data came form SAP System .
TM1 requires that all elements ( c-level or n-level) are uniquely named. Your source file does not comply with that requirement. Your options are to redefine the source file (Parent, Child format) or code for the fact that the source file is not in the structure that will align to the system requirement.

I assume you are using the TI wizard/ 'Maps' tab because you have not posted any code that shows you are trying to solve the problem per TM1 requiring unique names?
thanks for read my post and tring for my solved problem
Next time I will expend effort for readers.

and now I solved the problem by "tm123"
you could see "tm123" reposting.

thanks.