Conditional Formatting on each Children

AlessandraPorroACN
edited November 2022 in Modeling

Hello everyone!

I have a list with multiple children, and I want to apply conditional formatting (using boolean line item first) to each children at a time.

How do I write a formula to select each children at the time instead of the parent? 

 

Basically I want to highlight every negative value for each sub list, but at the moment it considers the entirety of the list. For example, if I have a negative value in Revenues Intercompany and a positive value in Revenue E-commerce, the latter will be highlighted (Even if positive) because the formula considers all of the children at the same time. How do I sort it out?

AlessandraPorroACN_0-1667560714741.png

 

Thank you.

 

Tagged:

Best Answer

  • ShubhamCh
    edited November 2022 Answer ✓

    Hi @AlessandraPorroACN 

     

    Remove the lookup part after User Input and the formula will work as intended.

    I created a test scenario based on your blueprint. Have a look:-

    Screenshot 2022-11-08 at 10.12.43 PM.png

    Screenshot 2022-11-08 at 10.13.52 PM.png

    Screenshot 2022-11-08 at 10.14.35 PM.png

    Screenshot 2022-11-08 at 10.15.04 PM.png

    Looking at your formula, I deduce that Revenue/Purchase is a numbered list and you only want to apply conditional formatting on children of first member of this list. If I am correct, remove lookup part after from your formula. See two CF line item, their formula and the output corresponding to negative and positive values.

    I hope, it'll solve your problem.

     

    Thanks!

    -Shubham

     

Answers

  • ManjunathKN
    edited November 2022

    Hi @AlessandraPorroACN 

     

    have you tried using logic this way, 

     

    if values<0 then true else false (simply use Values<0)

     

    Thanks,
    Manjunath

     

     

  • ShubhamCh
    edited November 2022

    Hi @AlessandraPorroACN 

    Create one number formatted line item

    Formula:- If child <0 then 1 else 0

    Keep the summary off.

    Use this line item to apply conditional formatting. 

    It should work fine as per your problem. 

    Thanks!

    - Shubham

  • AlessandraPorroACN
    edited November 2022

    Hello!

    It's what I did but it still display total values. 

    AlessandraPorroACN_0-1667809957774.png

    For example, here it should displays 0 because the value is positive, but it displays 1 because in another child the value is negative. I want the value to be displayed per each child.

    Also how do I set a formula in case other childs will be added?

    Thank you

  • ShubhamCh
    edited November 2022

    Hi @AlessandraPorroACN 

     

    Something is missing in your problem description otherwise the cell would show 0 only. Please share your blueprint view. 

    A formula once written, doesn't get affected by number of children. It just calculate according to the written expression. You don't have to worry about the new list item but something is missing in the description. Please share the blueprint view. 

     

    Thanks!

    - Shubham 

  • AlessandraPorroACN
    edited November 2022

    AlessandraPorroACN_0-1667922037988.png

    There you go!