Hello fellow community users! I was wondering if anyone else had issues changing line item formula with lookup with the following error message: "format of mapping used for lookup doesn't match any dimension of the source" and what to do to remedy the situation.
@einas.ibrahim I do for country but not for role, let me reconfigure to EMP03 and see what happens. Should it look something like: IF Employed? THEN Salary * 'EMP01 Employee Drivers'.Bonus %[LOOKUP: 'SYS08 Employee Details'.Department, LOOKUP: 'SYS08 Employee Details'.Country] ELSE 0, 'EMP03 Employee Drivers by Role'.Bonus %[LOOKUP:'SYS08 Employee Details'.Role]
@einas.ibrahim The IF Employed? THEN Salary * 'EMP01 Employee Drivers'.Bonus %[LOOKUP: 'SYS08 Employee Details'.Department, LOOKUP: 'SYS08 Employee Details'.Country] ELSE 0, 'EMP03 Employee Drivers by Role'.Bonus %[LOOKUP:'SYS08 Employee Details'.Role] ELSE 0 gave a response as invalid this time. Are you seeing anything in the lookup that is not correct?
Let me explain the concept again because it is usually confusing to beginners (and some not so beginners 🙂)
This is the step by step logical thinking one should use to arrive at the formula. Of course, once you understand the concepts you would automatically do all this in one step.
Q: What are we trying to accomplish? A: Find out the Bonus % for a particular employee in the Target Module Emp02 ( a Target Module is where we are writing the formula)
Q: Where can we find the Bonus % information/values? A: In Emp03. This is the Source Module since it contains the data we are looking for.
Q: What information do we need to provide to the Source module -Emp03- to return a single value? in other words, what is Emp 03 dimensioned by?
A: Emp03 is dimensioned by E1 Department and Role. This basically means if we give Emp03 a Department and a Role we will get the Bonus % for this Department and Role.
Q: Do we have this information required by Emp03 (Department, Role) in our Target Module Emp02 to be able to query Emp03 and return the Bonus % for a particular employee? (the data we are looking for?) A: Short answer is NO, The department and role data are not included in Emp02. This means we can't query Emp03 directly.
Q: What do we do then? A: We find an intermediary module that we can query using the information we have in Emp02 - #E2 in this case- to return the information I need - department and role.
Q: Where can I find the employee department and role?
A: In SYS08. This is our Mapping Module.
Q: What do we do now?
A: We query the Source (Emp03) for the Bonus % by giving it the department and role information it requires. The way to provide this information to Emp03 is to use an intermediary SYS08 to give us department and role which in turn we pass to Emp03
The way we construct all this in a formula would be something like this:
Target Module. Line Item = Source Module. LineItem[LOOKUP: mapping module.data 1 required by Source Module, LOOKUP: mapping module. data 2 required by Source Module, LOOKUP: mapping module.data 3 .....and so on ]
Notice that Country didn't come up which means we don't need it. Please read the above steps carefully and let me know if I need to clarify anything. After you digest the information, write the formula, test it, and send it to me to make sure you got everything right.
Einas "Give a Man a Fish, and You Feed Him for a Day. Teach a Man To Fish, and You Feed Him for a Lifetime"
Wow thank you very much for the detailed description! From the information I read, I understood that the formula is :
IF Employed? THEN Salary * 'EMP03 Employee Drivers by Role'.Bonus %[LOOKUP: 'SYS08 Employee Details'.Department, LOOKUP: 'SYS08 Employee Details'.Role] ELSE 0
Because EMP03 bonus is the source module line item needed, and then LOOKUP SYS08 department and role are the mapping due to containing the necessary information, while country is no longer needed and that was deleted. I did not receive an error when I entered that into the EMP02 Bonus blueprint formula. Am I missing anything from the formula?