2 Replies Latest reply on Jun 6, 2016 9:30 AM by shreya agarwal

# What is difference between billions(G) and billions(B) in Tableau?

I see two options in billions (G) and (B). What is the difference between the two?

I have over 2000 numbers in millions. I want to convert them to closest -illion to make it readable.

For instance: (in Million)

 \$21,047.07 \$963.02 \$40,571.73 \$11,784.21 \$429,327.83 \$39,925.26 \$3,442,019.53 \$797,791.19 \$94,905.34 \$1,913.12 \$496,642.16 \$47,247.16

I need \$21,047,070,000 to read as 21 Billion and  \$429,327,830,000 to read as \$0.4T

Is it possible to do that in Tableau?

• ###### 1. Re: What is difference between billions(G) and billions(B) in Tableau?

Shreya,

I think the G is for Giga, but I don't think it does anything differently from B.

You could try a calculation to get more what you want.

Please see if the following could be a starting point for you.

I used the Length of the Value,

but there were issues with Rounding and extra digits,

and so it required some string manipulation.

IF [LengthValue]=9 THEN LEFT(STR(ROUND([Value]/1000000000,1)),3)+"B"

ELSEIF [LengthValue]<12 THEN STR(ROUND([Value]/1000000000,0))+"B"

ELSEIF [LengthValue]=12 THEN LEFT(STR(ROUND([Value]/1000000000000,1)),3)+"T"

ELSEIF [LengthValue]<15 THEN STR(ROUND([Value]/1000000000000,0))+"T"

ELSEIF [LengthValue]=15 THEN LEFT(STR(ROUND([Value]/1000000000000000,1)),3)+"Q"

ELSEIF [LengthValue]<18 THEN STR(ROUND([Value]/1000000000000000,0))+"Q"

END

• ###### 2. Re: What is difference between billions(G) and billions(B) in Tableau?

Thanks Swaroop. Appreciate it.