KNOWLEDGE BASE

Formatting Large Amounts With Millions Marks ($1 M) While Still Displaying Amounts Less than a Million


Published: 23 Mar 2017
Last Modified Date: 31 Mar 2017

Issue

How to format text to display millions and lower amounts simultaneously.

Environment

Tableau Desktop 

Resolution

Create a calculated field similar to the following:
IF SUM([Invoice]) >= 1000000 THEN "$" + STR(ROUND((SUM([Invoice])/1000000),1)) + "M" 
ELSE "$" + STR(ROUND(SUM([Invoice]),0)) 
END

Additional Information

This calculated field returns a string, meaning it will work for labels but cannot be used in any numerical calculations or for totals.
Did this article resolve the issue?