Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
guya
Contributor II
Contributor II

Negative number format

All,

I would like to display negative number in brackets and red if possible in a pivot or straight table.

Is this possible?

With many thanks,

Guy

1 Solution

Accepted Solutions
Not applicable

Oops that was wrong,

try: #.##0,0%;(#.##0,0)%

Have Fun with QV

Alex:)

View solution in original post

11 Replies
Not applicable

Hi

Use someting like this as expression:


=if(YourValue<0,'(' & YourValue & ')', YourValue)


Replace YourValue with your value... tell me about it Stick out tongue

The color can be done in the "Visual Cues".
Beware: Adding brackets changes the Number Format to a Text Format and the Visual Cue "<= 0" wont work for formatting it red!

Greets

Not applicable

Hi,

sorry but no wou won't do that with an if.

Go to the Properties of the chart, then to tab "Number", point to the Formula you would change, choose a format i.e. "fixed to 2 decimals" the format pattern shows #.##0,00. Then you add ";(#.##0,00)" to that pattern. The pattern after the ";" is for negative values.

For the colour, you go to tab "Visual Cues" and point again to the Formula you would change and write a 0 (zero) in the input box after "lower <=". Then choose a colour and say O.K.

Have Fun with QV

Alex:)

guya
Contributor II
Contributor II
Author

Thanks for your prompt reply.

Alex, the final format looks like this #,##0.00;(#,##0.00) and works fine - Thx. I tried the same for percentage result but with no success.

I used this format #,##0.00%;(#,##0.00%) and the result changed. e.g the number -21.86% becomes (0.22%).

Any idea?

Guy

Not applicable

This happens, in my example, when the decimal/Thousand seperator in the pattern differs from the separators in the pattern.But I'm not shure about that.

Alex:)

Not applicable

Oops that was wrong,

try: #.##0,0%;(#.##0,0)%

Have Fun with QV

Alex:)

guya
Contributor II
Contributor II
Author

It works fine!

Thanks a lot.

Guy

Not applicable

Hi

Sorry for commenting on an old post.

I am trying to show minus brackets on Gauge chart but it only converts the value to (1.0)% rather than (100)%. I have used the formating: #.##0,0%;(#.##0,0)%.

And the negative formating works fine on straight table but not on Gauges

Can you please help..

regards

Buti

vijay_iitkgp
Partner - Specialist
Partner - Specialist

Hi,

one work around. Go to Chart Properties---> Number. Check Integer and then check show value in %. after that uncheck integer and check money. you will get desired result.

Not applicable

Hi Vijay

Stil not getting the desired results.

regards