Error : EMP02 - Dimension of mapping used for lookup doesn't match any dimension of the result.

Hi Experts,

Please help on the below mentioned issue while adding formula for Bonus, Car, Phone costs & Medical costs to the EMP02 Module.

 
Bonus IF Employed? THEN Salary * 'EMP01 Employee Drivers'.Bonus %[LOOKUP: 'SYS08 Employee Details'.Department, LOOKUP: 'SYS08 Employee Details'.Country] ELSE 0
Car costs IF Employed? THEN 'EMP01 Employee Drivers'.Car Allowance[LOOKUP: 'SYS08 Employee Details'.Department, LOOKUP: 'SYS08 Employee Details'.Country] ELSE 0
Phone costs IF Employed? THEN 'EMP01 Employee Drivers'.Phone Allowance[LOOKUP: 'SYS08 Employee Details'.Department, LOOKUP: 'SYS08 Employee Details'.Country] ELSE 0
Medical costs IF Employed? THEN 'EMP01 Employee Drivers'.Medical Benefits[LOOKUP: 'SYS08 Employee Details'.Department, LOOKUP: 'SYS08 Employee Details'.Country] ELSE 0

Thanks Error.JPG

Best Answer

  • Hi @rahulharjai ,

     

    You are using #E2 Employees: Active ?  as a LIST  not a subset of #E2 Employees. Please find the screenshot of Pivot view of EMP02 module and observe the difference.

     

Answers

  • Hi @rahulharjai ,

     

    This error occurs usually when you have mismatch of the dimensions. 

     

    In your case the formula for Bonus, Car, Phone costs & Medical costs are currently referred from EMP01 Employee Drivers module(dimensions : G2 Country and E1 Departments; that's the reason the lookup is done to match the country and department.)

     

     

    Hope this helps.

     

    Jitendra

  • @Jitendra.Vishnolia

    I had tried the approach shared, but facing an issue related to not recognized line item. Please find the attached screenshot.

     

     

    error1.JPG

  • @rahulharjai 

     

     My apologies for the misunderstanding.

     

    Please check the format of the line item Department of SYS08 Employee Details module it should be #E2 Employees, and try again with the initial formula.

     

  • Hi @Jitendra.Vishnolia 

     

    Thank you for your help !

     

    I tried to change the format of department list item of Sys08 Module from E1 Departments to #E2 Employees but facing an below mentioned issue. Please help.

     

    Issue :

     

    Thissys08.JPG

     

    Blueprint View:

     

     

    earlierSys08.JPG

     

    Thanks & Regards,

  • @rahulharjai 

     

    Can you share the Blueprint view of EMP 02 Employee Expenses Module as well.

  • @Jitendra.Vishnolia ,

     

    Yes, Sure. Please find the attached blueprint for EMP02 Module.

     

    Emp02 Module.JPG

  • @rahulharjai 

    I just wanted to add one point that @Jitendra.Vishnolia brought up which is absolutely correct and might be helpful to you as you continue to use LOOKUP, SUM, and SELECT.

    For me when I started using these functions, it was helpful to think of modules as tables and the line items that I wanted to use to join as the primary or foreign keys. 

    So like any SQL join, you have to join the tables by a common key with the same format. The same is true in Anaplan.

    If I want to join two modules together using formulas, i need to have a common line item in the same format. 

     

    Also , when you're ready, read the best-practice post on DISCO by @DavidSmith . This is by far one of the most important documents written on this subject. This will also help you set up system modules which contain all the "keys" and properties of your lists.

     

    I'm really glad you asked this question. It took me a very long time to get this figured out so I hope you'll continue to ask the Community anytime you get challenged by these functions. Between the best-practice posts and this Community Site is where I learned pretty much everything I know about Anaplan.

  • @rahulharjai ,

     

    EMP02 seems to be fine, can you also share EMP01 Module Blueprint view.

  • @rahulharjai - one of the formulas you mentioned doesn't work because the result is a true or false format so that needs to be changed.

    Try to break down what you're trying to achieve in to small steps.

    Then you can think about the relationships you need to make as mentioned by @JaredDolich by using either sum or lookup or select (try to avoid select where possible),

    Then you can build the solution. 

     

    I hope this helps!

     

    Thanks,

     

    Usman

  • Hi @Jitendra.Vishnolia ,

     

    Apologies for delay in response.

     

    Please find the attached EMP01 Module Blueprint View.

     

    EMP01.JPG

     

    Thanks & Regards,

    Rahul Harjai

  • Hi 

     

    @JaredDolich@usman.zia

     

    Thank you for sharing the valuable insights !

     

    Here I am referencing the instructions provided in manual to create the EMP02 module and its formulas as it is provided by Academy content team and facing issue in that. Is there any typo error or missing step in instructions ?

     

    instructions.JPG

     

    Thanks & Regards,

    Rahul Harjai

  • @rahulharjai 

    Your so close!

    Unfortunately, we can't give direct answers on the certifications but let me try to point you in the right direction.

    In your SYS08 module, you need to check the format of your department line item.

     

    Remember, ITEM(department) results in a list formatted line item for department. Parent(item(department)) will give you a list formatted line item of the list that is above department.

    Experiment with different formulas and/or formats to get it right. 

    The error you're getting is your best clue.

     

     

  • @Jitendra.Vishnolia 

     

    Please find the attached screenshot for EMP02 & EMP01 Module.Error11.JPG

     

    EMP01.JPG

     

    Thanks & Regards,

  • @Jitendra.Vishnolia 

     

    Thank you Jitendra !