Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ziabobaz
Creator III
Creator III

P() and E() in one line

Hi!

I have:


Screenshot_14.jpg


[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!




1 Solution

Accepted Solutions
sunny_talwar

Seems to be working for me

Capture.PNG

Your sample seems to have sum, but you are using SUM in your expression... could that be the issue?

View solution in original post

3 Replies
sunny_talwar

Seems to be working for me

Capture.PNG

Your sample seems to have sum, but you are using SUM in your expression... could that be the issue?

sunny_talwar

I tried it in QlikView, I am sure Qlik Sense will work the same way

ziabobaz
Creator III
Creator III
Author

it was my wrong

I was expecting 300 and 100 as a result, but now i understand

thank you