IF ELSE statement for different hierarchy levels

Hi team! I have a question about using IF ELSE statements for different levels of hierarchy. I have hierarchy on level 2 (L2) and level 3 (L3). I also have line items which are calculated for L2 and L3 respectively. I need to create a line item on L3 which goes IF *Item from L3* THEN Line item for L3 ELSE Line item for L2.

 

I managed to do the boolean which shows me if the item is from L3 but I can't manage to create IF ELSE statement due to Level mismatch error.

 

Is there a workaround which can help me to solve this problem?

Tagged:

Best Answer

  • MarkWarren
    Answer ✓

    To reference an item at a higher level, in this case at L2 you need a line item for the parent of L3 so you can do a LOOKUP.
    Something like:
    IF isL3 THEN 'L3 reference' ELSE 'L2 reference'[LOOKUP: 'L3 Parent']

Answers