-3

I have a a column of dollar amounts that I want to calculate the running difference (opposite of sum() ? ) of. Does Reporting services have a diff function or something way that I can do a running difference on a column?

Example dataset:

Year  |    amt   | pts
2007  |  1500    | 0
2008  |  1200    | 10
2009  |  1800    | 0

what I'm looking to do is take a running difference of the amt column and another for the pts column. Something to get me to...

amt = -1500     // (1500 - 1200 - 1800) 
pts = -10       // ( 0 - 10 - 0)
0

1 Answer 1

4

You can use an expression for the total that would look like this:

=SUM(iif(Fields!Year.Value = MIN(Fields!Year.Value, "YourDataset"),Fields!Dollar.value,-1*Fields!Dollar.value))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.