Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
i've got a table with order, amount, status and date.
I only want to count the amounts of the order if the order has both status x and y.
example:
Order amount status date
1 10 x 2009-02-03
1 10 y 2009-02-07
2 20 x 2009-05-01
3 30 x 2009-05-02
3 30 y 2009-06-30
Here it must only count the orders 1 and 3 (amount 10 and 30 )
How can i do this?
thanks,
Rey-man
Hi,
I`m not sure how much this attached application is going to help you.
Check the attachment and let me know if it works for your scenario.
- Sridhar
Hi,
You can try with this if(count(total <Order> distinct status)>1,sum(amount))
Hi Ste82,
it would be possible if it has only 2 different statusses. But there can be 10000 different statusses. I only want to sum the amounts if the x and y status are in the table
Hi,
I`m not sure how much this attached application is going to help you.
Check the attachment and let me know if it works for your scenario.
- Sridhar
Thanks Sridhar,
this is the solution I needed.
Thanks a lot