1 Reply Latest reply on Feb 11, 2020 12:11 AM by Tim Beard

    Change font color of calculated field having two dimensions

    Pradnya Ambre

      I want to create a new calculated field to combine the category name and subcategory name. Below is the formula I have used to do the same-

      [category name] + ' ' + '(' + [subcategory name] + ')'


      The above formula will give me a new dimension 'category name (subcategory name)'


      Is there a way to change the font color of the category name and subcategory name in Tableau so as to be able to distinguish more easily?

      Something like below-

      Technology (Phones)

        • 1. Re: Change font color of calculated field having two dimensions
          Tim Beard

          Good morning Pradnya Ambre,


          In a word, no. It is not possible to format different parts of a single field differently.


          However, depending on exactly what you want to see where, the effect you are seeking may be possible. See below:


          I used the combined field for the headings (which could now be removed) and added both the label fields to Label on the Marks Card, clicked on the ellipsis next to Text:

          and formatted the separate fields in the label differently:


          I hope this helps you to achieve what you were looking for!


          Note that should your real example have a field that is not a combination of two existing fields, you could also split the field within the data panel or using string functions to give you the separate fields for your labelling.



          1 of 1 people found this helpful