String Measures used a Reference

Post Reply
appleglaze28
Regular Participant
Posts: 269
Joined: Tue Apr 21, 2009 3:43 am
OLAP Product: Cognos TM1, Planning
Version: 9.1 SP3 9.4 MR1 FP1 9.5
Excel Version: 2003

String Measures used a Reference

Post 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.
Attachments
Transfer.JPG
Transfer.JPG (77.28 KiB) Viewed 2473 times
lotsaram
MVP
Posts: 3703
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: String Measures used a Reference

Post 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.
appleglaze28
Regular Participant
Posts: 269
Joined: Tue Apr 21, 2009 3:43 am
OLAP Product: Cognos TM1, Planning
Version: 9.1 SP3 9.4 MR1 FP1 9.5
Excel Version: 2003

Re: String Measures used a Reference

Post 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.
Post Reply