4 Replies Latest reply on Oct 31, 2012 1:06 PM by Michael Cristiani

    Question - Calculated Field formatting

    . Tableautester

      Is there a way to format the display of different fields in a calculated field that combines multiple fields?

       

      For example I have a calculated field with the following code:

      "Cts: " + str(sum([MyDatabaseTableColumn]) )+ "PercentOfTotal: " + str( sum([MyDatabaseTableColumn]) / TOTAL( sum([MyDatabaseTableColumn]) ))

       

      Using this calculated field on the Text Shelf gives the following result:

      Cts: 1234 PercentOfTotal: 0.123456789

       

      I would like the calculated field to give me the following display format:

      Cts: 1,234 PercentOfTotal: 12.3457%

       

      Also is it possible to change the format of the built in Tableau calculations when I use multiple built in Tableau calculations in the same calculated field?