views:

5

answers:

0

Hello, I have a report which has a column which is called InvoiceAmount, in addition there is a column called InvoiceNumber. It happens that those columns are filled 2 or more times due to other conditions and thus the same InvoiceAmount appears in several rows.

Example:

... 876543 | 1000,00$ ...
... 123456 | 7250,00$ ...
... 123456 | 7250,00$ ...
... 123456 | 7250,00$ ...
... 084625 | 2500,00$ ...

Now when I calculate the sum over the 2nd column, I get 21750 $ (3 * 7250 + 1000 + 2500). What I want is 10750 $ (1000 + 7250 + 2500) for the sum. Imagine there are more cases like that for many InvoiceNumbers, the total wont be correct. Is there a nice way to only take one of those amounts into account when totalling?

Thank you :-)!