3 Replies Latest reply on Jul 11, 2017 2:07 PM by Jay Morehart

    SQL for beginners

    Kyra Owensby

      Hi, I'm new to Tableau and I'm currently using Tableau 10.3 to draft graphs for my office. However, when I try to mimic graphs from tableau public or you tube demonstrations I always get an error when trying to edit my Custom SQL. This has happened even when I've copied the given commands. The only time I was able to get one to work was when I used a workbook from tableau public, however another time it did not work (these were both older versions, I don't remember the exact numbers, but the one that worked was a version 9 and the one that didn't was a version 8).

       

      Can anyone explain what is going on, or direct me to resources that will teach me how to create my own? This would be extremely helpful.

       

      Thank you

        • 1. Re: SQL for beginners
          Matt Lutton

          Can you share an example/screenshots, or somehow show us a bit of what you're experiencing here? 

           

          Are you inheriting workbooks that use a Custom SQL connection?  I am trying to understand why you are using Custom SQL in the first place, as it is generally a slower connection option versus connecting live to a data source:  Connecting Through Custom SQL Causes Slow Performance | Tableau Software

           

          If I can better understand your needs, I will be happy to help.  Any details you can provide about what you are attempting to accomplish will be helpful -- thanks!

          • 2. Re: SQL for beginners
            Kyra Owensby

            SQL Error.jpg

             

            Here is an example of what I mean. I used the same commands yet received an error.

             

            My goal is to create more visually pleasing charts and graphs as my boss doesn't want to see a lot of simple bar and line graphs in our next report. I began trying to find new ways to show the data and found some radial charts from Bora Boren. When I tried to input my own data in to his charts it didn't work so I found a video that walked you through the steps, unfortunately when I tried to use his SQL commands it still didn't work. Luckily he had also loaded the workbook that he used to recreate Bora Boren's graphs and I was able to manipulate it and create this:

            Radial chart.jpg

            (I know the colors aren't the best but it's what I was told to use.)

             

            Everything that I found involved people using Custom SQL in addition to calculations to create more complex graphs. This is what I need to be able to do. If there is a simpler way to do this I am open to that as well.

             

            Thank you!

            • 3. Re: SQL for beginners
              Jay Morehart

              Its hard to tell just from screenshots and not being able to see the actual data, But I think you just have some naming issues

              it looks like your table is named [Orders] not [Orders$] (unless your data source requires "$" at the end of table names for some reason) and [Product Category] should be [Category]

               

              I don't know what all the steps are for the radial bar chart (can you post the link to the directions you followed and maybe a packaged workbook?), But a custom SQL statement can be added to the "Join" area by it self, otherwise you will need to join it to the [orders] table you already have out there (this may be intended)

               

              hope this makes sense