question

Jody avatar image
Jody asked

How do you set the running total to 0 when it gets below 0 (-1) ?

example:

bal

2 2

-3 0

1 1

3 4

-1 3

2 5

-6 0

3 3

sql-server-2012reporting-servicesrunning-total
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Lukasz8519 avatar image
Lukasz8519 answered

Maybe you could use case statement, case when some value < 0 then 0 .... else .... end

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.