COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: psrpsrpsr on 07 Jul 2017 12:47:44 PM

Title: How do you display positive numbers with a + sign?
Post by: psrpsrpsr on 07 Jul 2017 12:47:44 PM
I'd like to display positive numbers on a trend report with a + sign in front of them.

I tried:
CASE WHEN [field] > 0 THEN '+'||[field] ELSE [field] END
...and that didn't work.

Is this possible?
Title: Re: How do you display positive numbers with a + sign?
Post by: New_Guy on 07 Jul 2017 01:05:55 PM
Hi,
Did you try adding a text item and rendering based on the value > 0 ?
Good luck
New guy
Title: Re: How do you display positive numbers with a + sign?
Post by: bdbits on 07 Jul 2017 01:26:57 PM
I think you could do this with a format string, e.g. +#,0.00;-#,0.00;"0.00";"null";

The first spec is positive values, second negative, third 0 values, fourth nulls.