how to solve level mismatch

Hi, 

Table A

FactoryModelModel.LineamountLine.Factory  
Japan

A

X100Japan  
 BX200Japan  
 CY400

Japan

  

Table B

Lineammount  
X300  
Y400  

 

I have "amount" (by Factory,Model) in tableA.

I want to aggregate "amount" by Model.Line in Table B.

 

I use the formula like "amount" = "TableA.amount[lookup:TableA.Model.Line]"

 

but the formula error has appeared "level mismatch"

 

I think the error has occured, because Line has two relationship.

Model has own Line and Line has factory as parent.

 

how to solve it.

 

 

 

Tagged:

Answers

  • Hi @hyudolee 

     

    The formula needed here is SUM and not LOOKUP, since you need to add up all the Xs and all the Ys values. 


    module B should be dimension by Line (X, Y)

    amount line item formula —>
    module A.amount[SUM:Model.line]

     

  • thank you for replay.

     

    I cannot clear it.

    Model.Line has no relationship with Line(which has parent as factory).

     

     

  • i can clear it by adding a new mid line item.

     

     

    Table A

    FactoryModelModel.LineamountLine.Factory  
    Japan

    A

    X100Japan  
     BX200Japan  
     CY400

    Japan

      
    TurkeyAX300

    Japan

      

     

    Mid (amount = TableA.amount)

    ModelModel.LineamountLine.Factory

    A

    X400Japan
    BX200Japan
    CY400

    Japan

     

    Table B (amount = Mid.amount)

    Lineammount  
    X600  
    Y400  
  •  I have 1 question.

    if there are parent relationship in dimension and formula,

    We cannot [Lookup or sum] function??

  • Hey @hyudolee 

    I am not sure I understand your question completely. Maybe give me an example to clarify?
    However, Having a parent-child relationship between the dimensions of the source and target modules does not preclude you from using the functions SUM or LOOKUP. 

     

    Generally, the error level mismatch is caused when the source and target modules in your formula don't have the same dimensions and you didn't provide a "mapping" for that missing dimension in your SUM or LOOKUP.

    An example would make it clearer to explain the issue, so please provide one.

  • Einas, thank you for replay

    I understand the parent relationship doesn't interrupt function (sum,lookup).

     

    the next question is the following case.(this is my first question)

     

     

    Table A

    FactoryModelModel.LineamountLine.Factory  
    Japan

    A

    X100Japan  
     BX200Japan  
     CY400

    Japan

      

    Table B

    Lineammount  
    X300  
    Y400  

     

    I use the formula 

    TableB.amount = "TableA.amount[Sum:TableA.Model.Line]"

     

    but error message has occured with "level mismatch".

    the point is Table A has two factories.

    one is Factory(applies to)

    two is Line.Factory(lineitem).

     

    I think this two line item interrupt the function(lookup, sum).

     

    the image is following.

    Factory has several Line.

    model has main one Line.

    so model's main Line.factory is different from producted factory

     

     

     

  • Hey @hyudolee 

    Let's make sure we have all the relevant information.

    1. What are the dimensions of Table/ Module A?
    2. which of the Module A line items is formatted as "List"?
    3. What are the dimensions of Table/Module B?
      I assume Module B is dimensioned by the list Model.Line only, correct?

    The blueprint would be very helpful.

  • @hyudolee ,

     

    Formula you mentioned "Table A.amount[SUM: Table A.'Model.Line'] " should work in Table B when you fetch amount from Table A. Factory line item in Table A don't prevent this from working. 

     

    Regards,

    JussiLi