2 Replies Latest reply: Sep 21, 2018 9:15 AM by Peter Gustafsson RSS

    =if((x_state) <> 'X',sum({<component_code <> {X_COST}>} quantity),'0')

    Peter Gustafsson

      Hello,

       

      Need to have help to create the correct formula in QS..

       

      What I would like to calculate is the sum for all components not having x_state set to 'X' and all quantity for all components except for a component code 'X_COST'.

       

      any idea how to solve this?

       

      OK formula is

      =if((x_state) <> 'X',sum(quantity),'0')

      but when adding the wanted excluded item 'X_COST' I fail with the formula...

       

      NOT OK formula:

      =if((x_state) <> 'X',sum({<component_code <> {X_COST}>} quantity),'0')

      The formula is OK when I switch/change the component code <> to = but I would like to do the opposite...

       

      BR

      peter