3 Replies Latest reply on Jul 18, 2018 6:39 AM by Nandhakumar Ramanathan

    Dimension fields with Underscore

    andy.yu

      Hello,

       

      I'm trying to see what is causing Tableau to sometimes remove the underscore "_" from my field names. I've gone through the forums but couldn't find the answer I was looking for

       

      • In my workbook, I'll connect directly to our SQL Server database (a database view) and under Dimensions, the fields do NOT have the underscore in them
        • Example: "fiscal_year" becomes "Fiscal Year"
      • I'll save the workbook to my local computer
      • In the database view, I'll add some new fields
      • When I open my saved workbook again, the new fields that I added to the view show up
        • BUT the fields have the underscore in them (e.g., "new_field" instead of "New Field")
      • Why is it that it didn't automatically remove the underscore in the field name?

       

      Any help or advice would be appreciated

       

      Tableau v.10.3.2

      MS SQL Server

        • 1. Re: Dimension fields with Underscore
          Wesley Magee

          Andy,

          My understanding is that this is due to aliases being embedded in the creation of the view. If you were to reference the same table, but bring it in as a custom SQL query then all of your fields would have the underscore. The table aliases were created when the view was created, so Tableau automatically grabs those aliases on import. If you didn't alias the new fields you created for the view, then they should still have the underscores.

          -Wesley

          • 2. Re: Dimension fields with Underscore
            andy.yu

            Thank you Wesley!

             

            Thanks, that makes more sense now from your explanation

             

            So going forward it looks like if I add any new columns to the view, it will by default have underscore in it because the table aliases for the new fields were not initially their when the view was created, so I would have to update those fields to not include the underscores

            • 3. Re: Dimension fields with Underscore
              Nandhakumar Ramanathan

              Hi Wesley,

               

              I facing the same issue in one of my dashboard. But I am not using custom SQL as you mentioned above instead I am using the database table. In database the field/ column names are having "underscores" but when I download the full data  I am not getting the underscores in my CSV or Excel output instead I am getting "Space" between two words. How to solve this problem?

               

              Thanks & Regards,

              Nandha