1 2 Previous Next 17 Replies Latest reply on Sep 27, 2018 8:40 AM by monisha.ramesh Go to original post
• ###### 15. Re: Custom Number Formatting (\$K,\$M)

There is a much simpler solution.
Go to format, select Number
On the drop down, select CURRENCY (CUSTOM)
Then on the UNITS drop down choose between thousands (K), Millions (M), Billions (B) etc.
Change the number of decimals on the same menu to display the number as needed.
Thant's it...No formulas needed!!

Hope this helped.
-Gaby- 1 of 3 people found this helpful
• ###### 16. Re: Custom Number Formatting (\$K,\$M)

I think the issue is that this only works for one constant unit. So if everything is in the millions, you are ok. But there is no way to just automatically tell Tableau that anything under 1,000,000 should have the K label, and anything above 1,000,000 should use an M label.

• ###### 17. Re: Custom Number Formatting (\$K,\$M)

This was posted on another site and worked for me so thought it might be useful:

Dynamic Labelling (\$B, \$M, \$K)

// >=1B

IF SUM([Dollar Value]) >= 1000000000

THEN ‘\$’ + STR(ROUND(SUM([Dollar Value])/1000000000,1)) + ‘B’

ELSEIF SUM([Dollar Value]) >= 100000000

// >=100M

THEN ‘\$’ + STR(ROUND(SUM([Dollar Value])/1000000,1)) + ‘M’

ELSEIF SUM([Dollar Value]) >= 1000000

// >=1M

THEN ‘\$’ + STR(ROUND(SUM([Dollar Value])/1000000,1)) + ‘M’

ELSEIF SUM([Dollar Value]) >= 1000 AND SUM([Dollar Value]) < 1000000

THEN ‘\$’ + STR(ROUND(SUM([Dollar Value])/1000,1)) + ‘K’

// <1K

ELSE '\$' + STR(ROUND(SUM([Local Dollar Value]),0))

END

1 2 Previous Next