4 Replies Latest reply on Jan 6, 2017 4:56 AM by Jim Dehner

# Round up number to nearest thousand

I am trying to round up numbers to the nearest thousand. I found this post and answer by kettan: How to round up numbers by nearest million? Which was very helpful but when I adapt the calculation to look like this:

IF INT([Number]/1000)*1000 = [Number] THEN [Number]

ELSEIF SIGN([Number]) = -1 THEN INT([Number]/1000)*1000

ELSE INT([Number]/1000)*1000+1000

END

It doesn't round up as I want it to... Here's how I would like the calculation to work:

Any suggestions much appreciated.

Stephen

• ###### 1. Re: Round up number to nearest thousand

Actually, this was simpler than I was initially thinking. I got the answer I was after using this calculation:

(ROUND(INT([Number])/1000,0))*1000

• ###### 2. Re: Round up number to nearest thousand

Hi

Have you tried a Round function on the value?

see below

Jim

• ###### 3. Re: Round up number to nearest thousand

Thanks Jim. I didn't know you could do this. I thought the round function only worked for decimals.

• ###### 4. Re: Round up number to nearest thousand

Thanks for the shout out

There are a number of Excel function that work in Tableau "Create Calculated Field" -

I just try typing them into the field to see what pops up - then go to the field list on the right of the frame

Jim