I am relatively new in TM1 and wondering any kind soul would be able to help.
I want to target cube to refer to currency_table for the rate
Reference table is currency_table has currency like USD, JPY.. and has the rate
The target cube has a picklist field called CUR (which has USD, JPY etc). If user choose USD. it will look for the rate from the currency table and insert into the target cube "rate" field
I cannot get rules right I tried the following but it was wrong
[Rate]=N:if ([Cur] = DB( currency_table, [currency] ),DB( [currency_table,[rate],0) )
Thanks for your attention
Vincent
You need to use the ! syntax as per the manual for matching elements across cubes.
Also, you don't need to test lookups - failures will silently return nothing.
So I'd suggest your code should simplify to something on the lines of
Quote
['Rate']=N:DB('currency_cube',
DB('This Cube',!Year,!Month,!Version,'Rate')
);
Dusherwo
I got it working thanks to you.
Cheers
Vincent