Page 1 of 1

String Measures used a Reference

Posted: Thu Oct 29, 2009 7:39 am
by appleglaze28
Can I use String or Numeric Measures as reference points when using DB rule command?

Like for this example...I'm trying to create a HR cube to accomodate personnel transfer. So I have 2 String field to determine the Dept as well as the Shift. I can't make it work. I tried using IF statement but that's just too static...I need to modify it every time I add a new Dept.

Code: Select all

['Transferred-In']=DB('Existing_Employee_Transfer',DB('Existing_Employee_Transfer',!Department,!Title,!Shift,!Version,!Year,!Month,'Dest. Dept ID'),!Title,DB('Existing_Employee_Transfer',!Department,!Title,!Shift,!Version,!Year,!Month,'Dest Shift ID'),!Version,!Year,!Month,'# of Employee For Transfer');
Or is what I tried to do is not possible?

2 follow up question.
1.For example with the Shift & Dept, I have ID as alias, would my 2 measure field be numeric or string if im inputting them as number instead of the whole word? Cause I'm considering all options and work around.
2. If I have to 2 Dept transferring the same personnel to the shame Shift & dept do they add up or not since this is a rule not a TI...I'm not familiar what will happen.

Re: String Measures used a Reference

Posted: Thu Oct 29, 2009 9:03 am
by lotsaram
A DB() formula can reference either a numeric or string value, however if you are evaluating a DB() which returns a string remember that you need to use the @ qualifier to tell TM1 to expect a string (eg. @=, @<>, etc.)

Your formula is clearly wrong, I'm not sure what you are trying to do but you have a complete internal DB reference followed by a comma then an element evaluation then another DB ref. This will not evaluate!

If 'Transferred-In' is a string and you are trying to concatenate then you need to use the "pipe" | not a comma to concatenate.

Re: String Measures used a Reference

Posted: Tue Nov 03, 2009 7:39 am
by appleglaze28
Transferred-In would contain the value of the # of Employees to be transferred. I'm not sure how to reference my Dest Dept ID & Dest Shift ID to have TM1 determine where to add a value in the data point base on the Dest Dept ID & Dest Shift ID. The only string would be Dest Dept ID & Dest Shift ID, however, I can also using their numeric code alias for this instead of the whole string name like "Accounting" for Dest. Dept ID or "Day" for Dest. Shift ID.