If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Need help on referencing from another cube

Started by satay2hot, 08 Sep 2016 08:17:06 AM

Previous topic - Next topic

satay2hot


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


dusherwo

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')
  );


satay2hot

Dusherwo
I got it working thanks to you.

Cheers
Vincent