8 Replies Latest reply on Oct 31, 2018 9:31 AM by wasseem el khatib

# Rounded Negative Numbers Showing As Positive

In Tableau, when I am rounding some negative numbers, because of the rounding, it is making my numbers turn into a positive.

i.e:

when rounding to 2 decimals, its showing as positive, however, when rounding to 3 decimals, it is showing as negative. See below:

2 decimals:

3 decimals:

I would like that when keeping the 2 decimal view, to show my number as (0.00) and not 0.00.

Please note that I am using the below as the number format:

#,##0.000;(#,##0.000)

Thanks

Wasseem

• ###### 1. Re: Rounded Negative Numbers Showing As Positive

Shinichiro Murakami Michel Caissie can you assist with the above? I am stumped.

• ###### 2. Re: Rounded Negative Numbers Showing As Positive

Yes, this is a bit tricky.

One way I can think of is following.

Data

 ID Score ID-1 0 ID-2 0 ID-3 0 ID-4 0 ID-5 0 ID-6 0 ID-7 0 ID-8 0 ID-1 -0.004 ID-2 0.004 ID-3 -0.005 ID-4 0.005 ID-5 -0.001 ID-6 0.001 ID-7 -0.009 ID-8 0.009

Outcome.

Either one of field is always null and there will be no duplication/overlapping.

Thanks,

Shin

• ###### 3. Re: Rounded Negative Numbers Showing As Positive

Thanks Shin,

I am surprised that with Tableau there is nothing simpler than this. I am sure others have the same issue.

However, my issue is that I am using table calculations to calculate variances for two data attributes.

Can you let me know if I do the same as what you are saying above but with the table calcs? I am not sure if your method works as I am doing something a bit more complex (see attached workbook).

If you see the below image, I am doing multiple measure values to do this. Please also see day 4 spend variance where it is showing in red (positive) but is showing 0.00 without brackets (which implies negative).

Note when I say B/(W) I mean Better / (Worse)

Thanks,

Wasseem

• ###### 4. Re: Rounded Negative Numbers Showing As Positive

Anyways, it's troublesome, to follow your approach with this method, this is the steps and outcome.

I understand there is business requirement, but from Tableau's product perspective, this kind of table view is not in a main scope, I think.

Thanks,

Shin

• ###### 5. Re: Rounded Negative Numbers Showing As Positive

Thanks Shin,

The problem with the above is that in the dashboard I am trying to create, I have about 10 variance calculations, so I would have to create 10 extra sheets. This works, but is tedious.

For the time being, I will use the above method but if you do think of something simpler that would be awesome.

Perhaps Brent Mathison can help out with this. Any ideas for something simpler?

Thanks

Wasseem

• ###### 6. Re: Rounded Negative Numbers Showing As Positive

Hi Yuriy Fal. Perhaps you have ideas for a simpler solution ?

Thanks

Wasseem

• ###### 7. Re: Rounded Negative Numbers Showing As Positive

Unfortunately, nope.

There's no such thing as a 'negative zero'

(as far as i could remember :-)

Yours,

Yuri

• ###### 8. Re: Rounded Negative Numbers Showing As Positive

Well Yuriy, when rounding to millions, then a negative zero makes sense in my opinion.

Our business partners here want to see the (0.0M) when it is lower and not 0.0.

If you do think of anything simpler, please let me know.

Thanks

Wasseem