Page 1 of 1

Writing a rule for string element

Posted: Tue Aug 26, 2008 6:01 am
by anote
I don’t know which function I have to use, but below is the example.

Cube: A
Amount Currency Explanation(String)
33000 THB AAA
1000 USD (It should show “AAA”, but it doesn’t)

Once I change the currency from “THB” to “USD”. The amount convert from 33000 to 1000 automatically from the exchange rate by using TM1 rule. However, explanation “AAA” doesn’t show. I don’t know the rule to get data. Could anyone please suggest me?

Re: Writing a rule for string element

Posted: Tue Aug 26, 2008 7:47 am
by Steve Rowe
Hi anote,
I'm not sure that you have posted enough information for us to establish what you are trying to make happen. If you could perhaps list the the dimensions in your cube and paste your rules into the post then we might be able to help you.

Cheers,
Steve

Re: Writing a rule for string element

Posted: Tue Aug 26, 2008 9:21 am
by Lukas Meyer
I assume you have something like

Code: Select all

['USD', 'Amount'] = DB('cube','THB','Amount') * 0.03;
Maybe you look up the numeric value (you should do so ;) ) or you have more elements.

Try this:

Code: Select all

['USD', 'Amount'] = DB('cube','THB','Amount') * 0.03;
['USD', 'Explanation'] = S: DB('cube','THB','Explanation');
notice the S: - this one does the trick.

Did I guess correctly?

Re: Writing a rule for string element

Posted: Wed Aug 27, 2008 4:14 am
by anote
Thank you very much for your kindly help.
It works :D