5 Replies Latest reply on Apr 19, 2018 11:07 AM by peter.hill

    Boolean True/False turn to null

    Mateusz Pozar

      Good afternoon all,

       

      I'm importing an Excel file into Tableau and have two columns which are boolean. The actual values in the fields is either True, False or null. But if I change the data column type to boolean, I get a null value in all rows. I've tried changing the Excel file to using 1 or 0 for the T/F fields, as well as all caps TRUE and FALSE, but with the same result.

       

      Looking at the documentation for data field types I can't see that I'm doing anything wrong here, so I must be missing something obvious. Any suggestions appreciated!

       

      Cheers

      Mateusz

        • 1. Re: Boolean True/False turn to null
          Norbert Maijoor

          Hi Mateuz

           

          For your reference the following (Tableau version 9.3)

           

          I "paste data" into Tableau & uploaded an exel with the following data

           

           

          dimensionmeasure 1
          aTRUE
          bFALSE
          c
          d
          eTRUE
          fFALSE
          g

           

          In both scenario my measure 1 column 1 is recognized as Boolean T/F without any further adjustment

           

          1 of 2 people found this helpful
          • 2. Re: Boolean True/False turn to null
            Tharashasank Davuluru

            Hi,

            When Tableau determines a data type for each field, if the values in a field don't match that data type, Tableau handles the field in one of several different ways, depending on the data type. For example, sometimes Tableau populates those fields with Null values, as shown in the following table:

              

            Mapped data typeTreatment of other data types in the field.
            TextDates and numbers are treated as text. Nulls are not created.
            DatesText is treated as Null. A number is treated as the day in numeric order from 1/1/1900.
            NumbersText is treated as Null. A date is treated as the number of days since 1/1/1900.
            BooleanText, dates, and numbers are treated as Null.

            If using fields that are based on mixed-value columns introduces difficulties when yanalyzing your data, you can do one of the following:

            1.Format empty cells in your underlying data source so that they match the data type of the column.

            2.Create a new column that does not contain the mixed values

             

            Regards,

            Tharashasank

            3 of 3 people found this helpful
            • 3. Re: Boolean True/False turn to null
              Mateusz Pozar

              Hi Norbert, thanks for your quick reply.

               

              As it turns out I needn't worry; When viewing the columns in the data source view they were listed as Abc and couldn't be changed to Boolean, but once I jumped onto a sheet they were correctly labelled as Boolean on the sheet (which then updated the category in data source view)

               

              So perhaps this is a rather innocuous bug?

              • 4. Re: Boolean True/False turn to null
                Mateusz Pozar

                Hi Tharashasank, thanks for your answer.

                 

                This is what stumped me. The column fields only contained True, False or null which shouldn't have given Tableau any trouble in reclassifying it as Boolean.

                 

                But anyway, problem solved by jumping into a sheet which also corrected the data source view.

                • 5. Re: Boolean True/False turn to null
                  peter.hill

                  I don't mean to resurrect a closed thread, but I am having a very similar issue with boolean values turning to null and the "answer" to this question does not apply to my situation, annoyingly.

                   

                  I have a set of data very similar to the OP, but instead of TRUE, FALSE, my data is in the form of YES, NO, for example:

                   

                  dimensionmeasure 1
                  aYes
                  bNo
                  c
                  d
                  eYes
                  fNo
                  g

                   

                   

                  When I load this data in the Data view, it shows this dimension as text, but when I change it to Boolean, it turns the entire column into null values.

                  When I flip to the Sheet 1, as indicated as a possible solution by the posters above, I can "Describe" the field and see the boolean values:

                   

                   

                  However, when I drag the field into the view, it still displays nulls:

                   

                   

                   

                  I am using Tableau 10.5.2 and the packaged workbook is attached.

                   

                  Thanks in advance to anyone willing to look into this very annoying issue!

                  -Peter