Data Viz Done Right

September 15, 2015

Tableau Tip Tuesday: Creating a Chart with One Measure & Two Number Formats

5 comments
This week I go back to a post I wrote in January that showed how to create a parameter that returns a value, but those values have multiple number formats (e.g., pounds and percentages). I then show how to use custom number formatting to display the metric selected with the proper number format.

Note: This logic only works if all of the numbers you are showing are positive.

5 comments :

  1. Thanks Andy! as always, very good tips!

    ReplyDelete
  2. That little label trick is simply brilliant!

    ReplyDelete
    Replies
    1. Great tip. I have been fighting number formatting in Tableau for some time and this was one of two solutions that I ended up settling on. The other which has become my go-to solution is one that was suggested on the forums (http://community.tableau.com/message/331262). In this solution, you create a calculated field per number format, place them all onto the Text card, and remove line breaks and spaces. In doing so, you are able to trick labeling with Nulls, resulting in versatile and dynamic number formatting on a single measure.

      Delete
  3. Andy, A great solution for the most complicated problem.

    I have been working with % and actual numbers, my clients keep asking to display both numbers all the time.
    I tried putting your solution to work but unfortunately this does not work when I change the unit of numbers to billions, millions or even thousands. But thanks for sharing the solution.

    ReplyDelete