Wierd attribute output

Post Reply
A.Pete
Posts: 38
Joined: Fri May 18, 2012 7:06 pm
OLAP Product: TM1 , transformer
Version: 9.5 + 10.1 + 10.2 + 10.2.1
Excel Version: 2010 + 2008
Location: Sweden

Wierd attribute output

Post by A.Pete »

Hey

I have an attribute in a dimension called CompanyCode (see picture below). Im using a TI process to create a textfile where I send in the attribute Company Code to the dimension and want the HFMCompany from it (using the ATTRS function seen in the picture.)

But when I look in the file it just writes "Company Code" instead of the actual element... (also seen in the picture).

What am I doing wrong here??

/Peter
Attachments
CompanyCode.jpg
CompanyCode.jpg (72.91 KiB) Viewed 3797 times
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: Wierd attribute output

Post by Duncan P »

This normally happens when ATTRS is used in TI and either the element name or the attribute name is not found. In such cases there will normally be a minor error generated as well.

You are using trim(V14) as the element name in the ATTRS function call but you are not outputting it with ASCIIOutput. What does V14 contain?
A.Pete
Posts: 38
Joined: Fri May 18, 2012 7:06 pm
OLAP Product: TM1 , transformer
Version: 9.5 + 10.1 + 10.2 + 10.2.1
Excel Version: 2010 + 2008
Location: Sweden

Re: Wierd attribute output

Post by A.Pete »

Hi

V14 is the value from the source cube containing the value in Company Code attribute in the HFMCompany Dimension. I tried Trim(V14) to see if that did anything different but it didnt.

The source cube contains a company, I.e 4050, and I want get the corresponding company in the HFMCompany dimension, in this case MH4050 as the picture below. Thats why im using the ATTRS function but I cant get it to work for the company dimension. There are however more companies in the source cube company dimension than there are in the HFM company dimension. Could this be the issue?

Br
/Peter
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: Wierd attribute output

Post by Duncan P »

From what you are saying it appears you are expecting ATTRS to do "find me the dimension element that has the attribute value ...". What it actually does is "fetch me the attribute value for the dimension element ...".

You are looking for "4050" and the dimension element is "MH4050". It's not going to find it. Is it valid to use 'MH' | V14? Is the relationship that simple?

[EDIT]
Alternatively if V14 is from a dimension in the source cube then can you put the HFM account name as an attribute on the source account dimension?
dr.nybble
MVP
Posts: 160
Joined: Wed Aug 17, 2011 3:51 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: Excel 2007

Re: Wierd attribute output

Post by dr.nybble »

This is now a logged defect in TM1 and will be fixed in an upcoming release. When an error occurs a minor error is logged but the ATTRS function does not clean up the stack properly so it returns the third argument to the function (the attribute name) rather than empty string.
A.Pete
Posts: 38
Joined: Fri May 18, 2012 7:06 pm
OLAP Product: TM1 , transformer
Version: 9.5 + 10.1 + 10.2 + 10.2.1
Excel Version: 2010 + 2008
Location: Sweden

Re: Wierd attribute output

Post by A.Pete »

Thx for all your replies! I kinda solved it with the tips from you Duncan but the bug also made me understand this a bit more!!

Thx again
Peter
Post Reply