1 2 3 Previous Next 31 Replies Latest reply on Apr 20, 2017 3:36 PM by Cathy Bridges

    Why Do Calculated Fields Destroy My Number Formatting?

    Shawn Wallwork

      Good question!

       

      [Jason Black just asked this question (well sort of) on another thread.  I think it deserves a thread of it's own, so I've posted it here]

       

      So Jason I'm going to describe to you the contortions you will need to go through to properly format your measured values if you've chosen to first run them through a calculated field. It's not pretty (and shouldn't be this difficult) but it can be done. As Joe Mako taught me, you can do a series of RAWSQL_ calls, combined with sting manipulations, to format your labels the way you want them to be displayed. Here's a real-world example of what I've had to do to accomplish this:

       

      Jason-4.PNG

      Line 2: Rounds the raw data to zero

      Line 3: Calls the data source and displays it as currency

      Line 4: Does the same thing.

      Line 5: Stays in the Tableau workbook and adds a % sign to the calculation

      Line 6: Stays in the Tableau workbook and...

       

      You get the idea....

       

      Let me know if you need help with the syntax.

       

      --Shawn

       

      EDIT: I've attached a text file to make it easier to use these formats.

       

      Message was edited by: Shawn Wallwork

        1 2 3 Previous Next