Hello,
Is there a way to avoid repeating a case statement. If the first is true, there is an amount subtracted from the result of the Case Statement. If if it is false, just the case statement result is printed. See below for an example. I hope this makes sense.
CASE WHEN TestField >0 THEN
( CASE WHEN SalesField = 'B' THEN SalesAmount
WHEN Sales2Field = 'C' THEN Sales2Amount
WHEN Sales3Field = 'D' THEN Sales3Amount
ELSE 0 END) - TestField
ELSE
( CASE WHEN SalesField = 'B' THEN SalesAmount
WHEN Sales2Field = 'C' THEN Sales2Amount
WHEN Sales3Field = 'D' THEN Sales3Amount
ELSE 0 END)