3 Replies Latest reply: Aug 10, 2018 2:42 PM by Глеб Аитов RSS

    P() and E() in one line

    Глеб Аитов


      I have:


      [status] is DUAL

      I want to sum orders created, but never delivered, but it returns nothing:

      sum( {<OrderN= P({<status={"order-created"}>})*E({<status={"order-delivered"}>}) >} SUM) )

      sum( {<OrderN= P({<status={"order-created"}>})-P({<status={"order-delivered"}>}) >} SUM) )

      I want to sum orders created and delivered, but it also returns nothing:

      sum( {<OrderN= P({<status={"order-created"}>})*P({<status={"order-delivered"}>}) >} SUM) )

      Finally, is that possible to refer to the value of the field in set analysis?

      For example,

      sum( {<OrderN= P({<status={"order-created"}>}), status={"$(=num(status)-1)"}>}) >} SUM) )   // since my status is Dual. I want to refer to the previous status of the current one (say, if 'created' is selected, i want to show the results for 'ready', which is previous to created)

      your advice will be much appreciated!