3 Replies Latest reply on Aug 30, 2017 8:11 AM by Venu Vankayala

    Export CSV tabcmd: Measure values issue

    Maria Samper


      I need to export a report to csv and placing it in a folder for sending regularly and I've seen the tabcmd export.

      I was really happy with this but the file is not showing the measures correctly: there are two columns called Measure Names and Measures Values with the headers as a values.

      I've tried to place them in the Detail as I saw in another post but it's still showing the Measures Values and Measures Names columns.

      Thanks for your help,


        • 1. Re: Export CSV tabcmd: Measure values issue
          Sharad Adhikari



          Could you provide the screen shot of the view that you are exporting? The other way to export right content would be to create a worksheet without those measure names and values, hide it (if necessary) and use tabcmd to export it.




          1 of 1 people found this helpful
          • 2. Re: Export CSV tabcmd: Measure values issue
            Maria Samper

            Thanks for answering Sharad.


            But yes, finally I've done this. If anyone is interested:

            1. Preparation: we need to drag the measures to the Detail, otherwise Tableau will not export that data.


                 2. Create batch file using tabcmd: tabcmd export "Workbook/View" --csv -f  "C:\Tableau\view.csv" --timeout 480

                       Here I’ve added as well the powershell script that you’ll see next step:

                           cd /d C:\Tableau

                           PowerShell.exe Set-ExecutionPolicy Bypass

                           PowerShell.exe -File "G:\Tableau\script.ps1"


                 3. Tableau export the Measures Values and Measures Names as columns and these need to be removed. This script imports the file, select and order the columns that we want and locate the final report. Please notice I'm using - Unique because the MeasuresValues and MeasureNames columns generate duplicates.

                                Import-Csv C:\Tableau\View.csv | select ID, Name, Date | sort ID -Unique | Export-Csv -Path C:\Tableau\View.csv –NoTypeInformation


                 4. Finally, use Task Scheduler for scheduling these batch files.


            Hope it helps!

            2 of 2 people found this helpful
            • 3. Re: Export CSV tabcmd: Measure values issue
              Venu Vankayala

              Hi Maria,


              Could you please provide the scripts for all above batch files.


              Thanks in advance!!



              Venu V