4 Replies Latest reply on Sep 7, 2013 2:01 PM by Joe Mako

    Create Complex report in Tableau

    pradeepbangarusamy

      I have a data set like below


      Sample 5.JPG.jpg

       

      Using the data set , I want to create the report in Tableau like below

       

      Sample 6.JPG.jpg

       

       

      For your reference, I have attached the excel sheet with data set. is it possible to create these type of report in tableau? Please help me for this.

        • 1. Re: Create Complex report in Tableau
          bha.jand

          Hi Pradeep,

           

          You can use a custom SQL for this requirement something like the following:

          select name,

          code,

          value,

          date

          from <your_table>

          where date between date - 30 to sysdate

          union

          select name,

          code,

          value,

          date

          from <your_table>

          where date between date - 60 to date -31

          union

          select name,

          code,

          value,

          date

          from <your_table>

          where date > date - 60

           

          Instead of date - 30, date -31, date -60, you can write a function in database to get the appropriate date.

           

          Hope this helps.

          • 2. Re: Create Complex report in Tableau
            pradeepbangarusamy


            I have already using the custom sql to created this report but I am not able to merge tow header to one column.

            is there a way we can achieve this using tableau?

            • 3. Re: Create Complex report in Tableau
              bha.jand

              You can create a calculated field for the header name you need, place it in Columns in Tableau.

               

              Hope this helps.

              • 4. Re: Create Complex report in Tableau
                Joe Mako

                There are a number of ways to accomplish this in Tableau.

                 

                Take a look at the attached for two potential routes:

                - No scaffold, uses the Measure Names/VAlues pills to get multiple columns in each Days Group. The downside is if there is no value for the combination of Days Group and Code, there will potentially be no mark in columns, or no column.

                - With scaffold, using custom SQL to connect and then a data blend. The scaffold has a record for every mark, so columns and marks will not disappear. This is sufficiently more complex, but has greater flexibility and precise control, eg you can add conditional formatting of each cell independently with calculated fields.

                 

                Let me know if you would like to explore these routes in more depth, or they they are not good fit for you situation, there are other routes.