4 Replies Latest reply on Jan 3, 2013 6:01 AM by Luis Campos

    Create a "Panel Chart" with multiple variables.

    Luis Campos

      In my database there are multiple sets of questions (separate columns with responses that refer to the same subject) that have non numeric values (such as inadequate/adequate/not present or yes/no/maybe). I want to build a bar graph "panel chart" for each set of questions.

       

      Attached is an example of the database with one set of questions. Based on the attached database, what I want is a "panel chart" with one row and multiple columns; for each Condition (Cond 1, Cond 2, etc.) I need three bars with counts respective to the Condition value (Inadequate, Adequate and Not present). My objective is to see in one graph all of the Conditions with their respective bars referring to the "value counts".

       

      Something like this:

       

      whatIwant.jpg

       

      Obs. There is no possibility of rearranging the database.

       

      Thanks in advance

        • 1. Re: Create a "Panel Chart" with multiple variables.
          Tracy Rodgers

          Hi Luis,

           

          Aside from changing the shape of your data, which you said is not an option--the best way I can think of doing this is to create several worksheets, one for each condition, and place them on a dashboard together. Each worksheet would have three different calculations for Adequate, Inadequate, and Not Present. (Similar to the following: if attr([Cond 1])='Adequate' then count([Cond 1]) end) 

           

          These would then be placed in the Measure Values/Names and they would be placed on each the columns and rows shelves; and Cond 1 would be placed on the color shelf.

           

          -Tracy

          1 of 1 people found this helpful
          • 2. Re: Create a "Panel Chart" with multiple variables.
            Catherine Rivier

            Hi Raul,

            Here are 2 possible solutions.  First is separate dashboards, as suggested above.  But, you don't have to create any new variables for that as was said, however - see attached.  It's a fast way to get things done (though it can be a pain to create filters applied to all charts, and it is 10x the pain if you have to make a single change, as you have to make it in all 10 charts.)

             

            Solution 2 is a single view, and you essentially create 3 variables per condition.  All the work is done up front, so can be a lot easier to maintain.  Just make sure to re-code your color assignments in your legend, so every Adequate is the same color.  The problem is you don't have an easy way to create clear delineation between each condition, as you can see.  One slightly odd solution is to create fake "break" variables, like the one I have in there called [ ' ].  Set those equal to 0, and throw them in between each group of condition responses, and you can create the break you need.

             

            Hope either of these fits what the bill for you.  Someone else might have even more ideas to suggest.

             

             

             

            Just as a side note: this is similar to data reshaping issues needed for survey data to make it more manageable.    I spent a good deal of time in various views trying to get data shaped the way you have it to work.  It's always doable (like most things in Tableau), but believe me, it makes it a whole lot easier to do work if ever possible to reshape the data as something like:

            ID     Condition     Response

            1       1                Adequate

            1       2                Inadequate

            1       3                Adequate

            2       1                Not Present

            2       2                Adequate

            etc.

             

            I've sometimes gotten around restrictions like that by either pulling data into a separate location (like an Access DB), or even a separate worksheet in Excel with a lot of hlookups.  There's even a data reshaping tool you can download in Excel, discussed here, for example:

            http://community.tableau.com/thread/106046

             

            But I definitely understand if it can't be done   Hope this helps!

            • 3. Re: Create a "Panel Chart" with multiple variables.
              Joe Mako

              Another option is a data blend with what I call a scaffold data source.

               

              Unpackaged the attached workbook to see the data source used.

              1 of 1 people found this helpful
              • 4. Re: Create a "Panel Chart" with multiple variables.
                Luis Campos

                Guys, sorry for the delay.

                 

                I finished the work that I was doing thanks to you and went on vacation.

                 

                I mixed a lot of what was posted. The main solution was to create a lot of separate sheets for each dimension, or else my database would have an impossible number of lines.

                 

                Not with the workbook here now, I`ll get it later and post it here.

                 

                Thx!