2 Replies Latest reply on Jan 7, 2015 8:55 AM by Syed Khadir Ahmed

    Add labels to blank fields in dimensions

    Jane Brownfield

      Hi,

       

      I have some data that comes directly from a database without any kind of location labels (no country or US state, it's blank).

      I want to reassign these fields without labels the correct state so that the data contained within can be a part of a geographic region.

      I don't need to group or change the data labels but actually name a blank label. Is there a way I can do this?

      Thanks!

        • 1. Re: Add labels to blank fields in dimensions
          Jennifer Clark

          Hi Jane,

           

          If something comes into Tableau as blank or NULL, you can edit the alias, but it will change all of the blanks or nulls to the same name. From what I'm reading, it sounds like you might need to:

           

          1. Do this on the backend... (I'm not sure of your data structure - but you might be able to join with a reference table).

           

          2. The only other thing that might help here is if there is some other identifier on the row to do logic in a calculated field. For example, if you know "XYZ company" is always "TX", you can create a new field that will assign the location for you.

           

          Are you able to share a workbook or an example? If there is sensitive info, you can exclude those columns for this.

           

          Thanks!

           

          Jennifer

          • 2. Re: Add labels to blank fields in dimensions
            Syed Khadir Ahmed

            Hi Jane,

             

            You can do that using a Calculated field..  Use the below formula to change you NULL values to the state you want to reffer...(change Others as the state name you want)

             

            ifnull([State],"Other")

             

            With the original Fields.. create the Map.. click on the 1 unknown ... Then Edit location..

            1.png

            Then Change the unrecognized location manually to the location you want to refer to.. 2.png

             

            Then just drag the Calculated filed to the color shelf .. so that all the states will have the correct name.. including the NULL.

             

             

            3.png

             

            Check the attached workbook.. Thank you!!

            1 of 1 people found this helpful