Note: As of June 2020, URLs in Tableau Public dashboard no longer function properly.
Note 2: Updated again on Aug 13th, 2020. URLs work again in Tableau Public but this CSV export method does not work in Tableau Public. It still works in Tableau Server and Tableau Online.
Tableau has a standard out-of-the-box way to download data from workbooks (if permissions permit for the user). But for new users who are just clicking on a URL to view a dashboard, they don’t want to learn new menus to figure out a simple export. So if you want to give an easy, 1-click option, you can add a button with a link. This can be configured to download specific worksheet data or the full data set. For this demo we’re just going show how to download the whole data set from the first sheet displayed on the dashboard.
Unfortunately, URLs aren’t working in Tableau Public as of this publishing, so you’ll have to try it out on your own server.
Other Ways
There is a Tableau JavaScript API that will allow you to add this functionality as well. The best use case for this is if you are embedding dashboards in a portal or other web page where you can control the code. I won’t go into the details here, Tableau has a nice example that you can check out: https://help.tableau.com/current/api/js_api/en-us/JavaScriptAPI/js_api_samples_get_data.htm