14 Replies Latest reply: Sep 27, 2012 8:56 AM by Nienke de Jong

# Sum if

I need to make a sum for different options.

Example:

The order for account A is 10. We have failed to deliver 1, which is marked as "failed". (in the tabel 2 rows, commom dimensions are accountnr and ordernr)

The order for account B is 100. We have delivered all.

I need the following result:

Ordered     Delivered     Not delivered

Account A     10               9               1

Account B     100          100               0

How can I proceed? Best to use Rowno or Recno? Or something else?

Thanks!

• ###### Re: Sum if

Please provide example of the input data.

• ###### Re: Sum if
 Customer Ordered/ delivered Article Date Amount Customer A Ordered 105 26-sep-12 1 Customer A Not delivered 105 26-sep-12 -1 Customer B Ordered 105 26-sep-12 1 Customer B Not delivered 105 26-sep-12 -1 Customer C Ordered 105 26-sep-12 1 Customer C Not delivered 105 26-sep-12 -1 Customer D Ordered 105 26-sep-12 1 Customer D Not delivered 105 26-sep-12 -1 Customer E Ordered 105 26-sep-12 1 Customer E Not delivered 105 26-sep-12 -1 Customer F Ordered 105 26-sep-12 1 Customer F Not delivered 105 26-sep-12 -1 Customer G Ordered 105 26-sep-12 1 Customer G Not delivered 105 26-sep-12 -1 Customer H Ordered 105 26-sep-12 1 Customer H Not delivered 105 26-sep-12 -1
• ###### Re: Sum if

Here you go

• ###### Re: Sum if

What output do u want??? no. of products deliverd/Not delivered?? do u have any field regarding that??

• ###### Re: Sum if

The output I need is in the following format:

Customer     Amount ordered     Amount not delivered

Customer A          1                    -1

Customer B          1                    -1

Customer C          1                    -1

So the second line per customer needs to be added to the first line. In this example it's only 2 lines per customer, but it can be more.

• ###### Re: Sum if

The output I need is in the following format:

Customer     Amount ordered     Amount not delivered

Customer A          1                    -1

Customer B          1                    -1

Customer C          1                    -1

So the second line per customer needs to be added to the first line. In this example it's only 2 lines per customer, but it can be more.

• ###### Re: Sum if

The output I need is in the following format:

Customer     Amount ordered     Amount not delivered

Customer A          1                    -1

Customer B          1                    -1

Customer C          1                    -1

So the second line per customer needs to be added to the first line. In this example it's only 2 lines per customer, but it can be more.

• ###### Re: Sum if

The output I need is in the following format:

Customer     Amount ordered     Amount not delivered

Customer A          1                    -1

Customer B          1                    -1

Customer C          1                    -1

So the second line per customer needs to be added to the first line. In this example it's only 2 lines per customer, but it can be more.

• ###### Re: Sum if

Where do you get the number ordered from in there?

• ###### Re: Sum if

Sorry, it's maybe confusing. Both examples are not the same.

• ###### Re: Sum if

Sorry, it's maybe confusing. Both examples are not the same.