1 Reply Latest reply on Mar 26, 2013 2:03 AM by Jim Wahl

    Changing the structure of the table

    Philip George

      Hi,

       

      I have an excel sheet which contains the data collected from a survey.Tables are in a structured format.

       

      during the survey answers for the questions were in check boxes and the participant can select multiple answers by checking check boxes.Data collected in the excel sheet is in the below format

       

      I am just imitating the the actual data below.

       

      Response ID   Which are the social media data your organization collect(Qn)   Facebook(Ans1)   Twitter(Ans2)           blog(Ans3)      Youtube (Ans3)

          001                                                    Null                                                                          0                    1                                   1                        0   

          002                                                     Null                                                                          1                    1                                   0                         0

         003                                                     Null                                                                            1                    0                                   0                        1     

       

       

      I want to create a barchart with this data.X axis-facebook,Twitter,Blog and youtube   Y axis -number of responses

       

      I created a barchart creating a calculated field and using the measure values and measure names into the sheet.

       

      But if I want to give color to each tab based on flag as 1 or 0 how will I do that for every column.Is there any other ways to structure this type of data.

       

      Regards,

      Philip George

                                                                   

       

      Structure of the table

        • 1. Re: Changing the structure of the table
          Jim Wahl

          Hi Phillip,

          I'm not sure what you mean when you say

          But if I want to give color to each tab based on flag as 1 or 0 how will I do that for every column.Is there any other ways to structure this type of data.


          You might be better off reshaping the data. Currently it's in a "wide" format. If you reshape it to a "narrow" format, you'll be able to add the Question to the Columns shelf and SUM(Answer) to the rows. Then you can add another dimension to the color shelf.

           

          You can use Tableau's Excel plugin (Installing the Tableau Add-In for Reshaping Data in Excel | Tableau Software) to reshape the data it will look something like this:

          reshape1.png

           

          And then you can get this:

          reshape2.png

           

          And now the color shelf is available to you. ...

           

          Jim