4 Replies Latest reply on Oct 19, 2016 8:27 AM by Mahfooj Khan

    Creating Date axis to use for multiple date fields for NON EXCEL Sources

    Archie R

      Hi All, I have multiple date fields in my data and would like to generate trending report using them. I am aware that below scenario for excel, you can achieve using pivot option.

       

      However my source is Tableau server. Can anyone suggest what can be done for NON-EXCEL, NON SQL DB sources, how can we achieve the following?

       

      Actual data

       

      Ticket

      Open Date

      Close Date

      Cancel Date

      11/1/20162/1/2016
      21/15/20165/1/2016
      32/1/20162/28/2016
      43/1/20164/1/2016
      54/1/20166/1/2016

       

      Expected Report

       

      Month End

      Open

      Close

      Cancel

      Jan 20162
      Feb 201612
      Mar 20161
      Apr 201611
      May 20161
      June 20161
        • 1. Re: Creating Date axis to use for multiple date fields
          Mahfooj Khan

          A small formatting required in your data structure. You've to pivot your Open,Close,Cancel Date fields so that you can get all the dates in a single column. You can use pivot option in tableau like this.

          After pivot you will have below mentioned view.

          Put a data source filter to exclude the null from Pivot field values like that

          now go to worksheet and drag these field in the canvas

          Hope this help. Workbook (version 9.3) attached for your reference.

           

          Mahfooj

          2 of 2 people found this helpful
          • 2. Re: Creating Date axis to use for multiple date fields
            Archie R

            Thanks for response Mahfooj. However, as I mentioned in my question, my data source is not excel. So pivot does not work. Could you suggest something that would work for non-excel sources?

            • 3. Re: Creating Date axis to use for multiple date fields
              Mahfooj Khan

              Another way without doing any pivot you can use Custom SQL to get this. If you're using any spreadsheet like excel,csv or tsv then you can go for this. I'm assuming you're using excel. Connect your excel with legacy connection in tableau. Then using custom sql you can write a query like this

              Once done then go to worksheet and drag your fields like that

               

              workbook attached for your reference. Hope this help.

               

              Mahfooj

              • 4. Re: Creating Date axis to use for multiple date fields
                Mahfooj Khan

                Hi Archana,

                 

                It was my mistake I overlooked your actual query. I don't think logically its possible. Tableau Server Published Data Sources are essentially read-only. What you would need to do is open the original workbook or data source that was published and then write Custom SQL on that, then extract it, and publish the new extract (either overwriting your original published source or creating a new one, depending on your need). That's the only way I can suggest.

                 

                Mahfooj