9 Replies Latest reply on Feb 28, 2017 5:51 AM by Karthik Venkatachalam

    Add Extract Data button in the Dashboard

    ankita vaishnav



      I have a requirement , the client wants to download the data used to create the dashboard(aggregated) into a .csv or .xls file format@@@@ . I know the option is available in the Tableau server as Download data given to publisher access. But the client wants this extract data button in the dashboard so that every user can see the data the dashboard is using. Is there a way to achieve this in the dashboard itself.

      below is the screenshot of the requirement. the extract button should be like the one in screenshot in the right bottom corner.


        • 1. Re: Add Extract Data button in the Dashboard
          Anna Cheetham

          I don't know a way to do exactly what you're asking (which most certainly does not mean that it can't be done!) but the way I've addressed an almost identical request is by making the "button" take you to a second dashboard which has a table with all the necessary underlying data.  This isn't all the data by any means but a specific subset and all the fields they're likely to be interested in.  It is also filtered based on any selections they make on the main dashboard.  But you could just as easily make it contain all the data if you wished.  At the top of that dashboard I then have instructions for how they can download it to Excel using Worksheet, Export, Crosstab to Excel.


          To do this, I first created a calculated field that just contains text "Click for Prospect List".

          Then created a worksheet which simply contains that field, the mark is set to "shape" and I've selected a shape that looks a little like a list of data but you could use anything you liked.


          go to prospect list.png


          I've positioned that worksheet towards the top right of my dashboard (I've cut out a small portion of the dashboard to share for confidentiality reasons - the "button"/worksheet is the orange bit of the picture).


          That worksheet then has an action filter on it that takes you to the second dashboard which contains another worksheet with a table of all the data and instructions at the top on how to export it. 


          prospect list.png


          So the button doesn't directly download the data but it allows you to summarise it or filter it as necessary, keeping only necessary columns and then talks the user through how to download that data from there.


          I realise this may not work in your case but thought it was worth sharing in case it helps in some way.


          Best wishes



          1 of 1 people found this helpful
          • 2. Re: Add Extract Data button in the Dashboard
            Tamas Foldi

            You can easily customize tabular views or underlying data views with JavaScript API:


            view underlying data.gif


            You can add new buttons to your dashboard, portal or actually do anything with your data. New vizualization types, paginated tables, modal windows, everything. Good resource from yesterday: Think Data Thursday - Vizception: D3.JS and Tableau integration - YouTube

            2 of 2 people found this helpful
            • 3. Re: Add Extract Data button in the Dashboard
              Jeff Strauss

              Yes.  Use the Javascript API to render the dashboard and then you can provide any custom functions that you want.  In our case, one of the options we provide the client is the ability to download the data to a CSV.  We provide a list of sheets that they can download the applicable data.


              API Reference


              1 of 1 people found this helpful
              • 4. Re: Add Extract Data button in the Dashboard
                Karthik Venkatachalam

                Solutions that folks above have given are hands down the coolest and best ones, if you have the horsepower to implement.


                If you want a quick and dirty way, Andy Kriebel has posted one below to a problem like yours. However, its going to be a pseudo button though. Button like image, that you can click, to export to csv.


                The Greatest Tableau Tip EVER: Exporting CSV made simple!

                1. Create a worksheet that you want to export.
                2. Remove all of the formatting to make it look invisible.
                3. Be sure to give it a name that makes it first alphabetically on the dashboard.
                4. Place the worksheet on the dashboard, float it, make it fit the entire view, make it really small, move it somewhere inconspicuous.
                5. Add an image onto the dashboard, float it and add a URL to it that is the URL for the dashboard with .csv on the end.
                • 5. Re: Add Extract Data button in the Dashboard
                  ankita vaishnav

                  Hi karthik,


                  I am not very much clear with  Javascript API Reference and i had tried the solution provided by you  but did not understand what exactly the URL should be. Should I place the empty excel in a specific location and give that URL or how does this work. Please can you guide me with the feasible solution.

                  What actually should the URL be like.?

                  I also added the URL like Tableau Server/views/Quality - Copy/Dashboard.csv




                  But still when I publish the workbook to server and then open this workbook and click on the excel image I get blank page. is there some name or something which I am giving?

                  • 6. Re: Add Extract Data button in the Dashboard
                    Karthik Venkatachalam

                    URL you have provided looks fine. It is just a matter of appending .CSV to the end.

                    I tried it on my server, it downloads the csv file fine. Clicking on image would open a new tab, and should pop up asking if you'd like to open or save the file. Works well with Chrome as well.


                    So, I am guessing it is likely to do with

                    1) Your browser security setting, which might forbid downloading certain files.

                    if not,

                    2) It might be to do with your Tableau server security setting. Can you reach out to your tableau admin, and ask them if csv file types are whitelisted? Your best bet is to whitelist file types following the steps given in the below link(s).

                    Accessing Files on a Network Drive Using a URL Action | Tableau Software

                    Error "A potentially unsafe URL has been blocked" When Using URL Actions | Tableau Software


                    I would suggest trying out step 2, if your browser settings are rigid and cannot be changed, unless you go thru IT, even then changing security for all possible client browsers as network wide policy, and if it is something really warranted for this one use case. Just try step 2.


                    After whitelisting, remember to restart the server and try the workbook again.

                    • 7. Re: Add Extract Data button in the Dashboard
                      Karthik Venkatachalam


                      Did you try "whitelisting" csv on server?. Did you reach out to Admin?

                      If my answer was helpful, could you please mark it as "Answered"?



                      • 8. Re: Add Extract Data button in the Dashboard
                        ankita vaishnav

                        Hi Karthik,


                        I tried going to the path:

                        C:\Program Files\Tableau\Tableau 9.3\bin


                        But according to the steps I do not have Tableau server folder here, also I contacted Tableau admin but did not receive any reply from them. Although your approach is really helpful for many scenarios.

                        I do have question, here when I am facing so many issues while downloading the excel file. It might be some setting or security issues with the browser. In case am successful in resolving this issue. But will the user face the same downloading issue due to browser setting in their systems. I guess they will right?


                        Thanks Karthik.

                        • 9. Re: Add Extract Data button in the Dashboard
                          Karthik Venkatachalam

                          This path is only in your Server, not in your Client machine. You have to RDP into your server and navigate to bin folder. Best option is to request your admin to have this do for you, also provide them the link to your csv and test out if it works on their PC. Because this might take a few tries (of whitelisting -> server restart -> Trying the csv download).


                          User would not face issues, as long as they have same security configuration as your PC. Best to test it out before rolling out.