Showing posts with label URL. Show all posts
August 14, 2018
The Greatest Tableau Tip EVER: Exporting Made Simple!

UPDATE: 14 August 2018
Version 2018.2 of Tableau introduced Dashboard Extensions. To make exporting data from dashboards as easy as possible, The Information Lab CTO and Zen Master Hall of Famer Craig Bloodworth created the Export All extension. What does this do?
If you have at least version Tableau 2018.2, then I'd highly recommend the use of this extensions versus the technique outlined below.No matter how much you try to convince them, there will always be some users who want to reduce your beautiful Tableau charts to a table of numbers in Excel. So if they're going to do it anyway, you may as well give them a simple, controlled way, generating one Excel workbook and not a bunch of CSVs. With the Export All extension for Tableau Server you can place a simple button onto your dashboard, choose which sheets & columns are exported, and with one click your users can download a clean & tidy Excel workbook.
We’ve all heard this question before: How can I export a CSV in Tableau? To be honest, it’s quite the pain and way more difficult than it should be. There have always been a few options.
- Users can click on a specific sheet on a dashboard and then export that via the tiny button on the toolbar, but that has a few of its own problems: (1) You may not want to show the toolbar therefore making the export impossible, (2) People have to be trained to know exactly where to click to get it just right, and (3) You have no control over the output of the CSV.
- You can export a CSV using Tabcmd, but that’s not useful for the average dashboard consumer.
- You can add .csv to the end of the URL like http://[Tableau Server Location]/views/[Workbook Name]/[View Name].csv. But again, you never know what that output is going to look like.
Yesterday I learned an incredibly valuable trick that would make option 3 (adding .csv to the URL) export exactly the CSV you want. Let’s look at an example.
On this dashboard, notice how I added an Image object (I used an Excel icon) on the dashboard. I’ve floated it to the upper right and made it small. All the user has to do is click on that icon and they get a nice CSV. Go ahead, try it!
Did you try it? If you did, and you opened the CSV, you may have noticed this looks remarkably like the data that you would hope to get if you exported the data for the line chart. But I didn’t export the line chart at all. Here’s the trick.
- Add the image icon on the dashboard and place it wherever you like.
- Add a URL link to the image. In the dashboard above, the URL is http://public.tableausoftware.com/views/ExporttoCSV/Dashboard.csv?:showVizHome=no.
This is where the magic sauce happens. When you add .csv to the end of a Tableau URL, Tableau will export the first sheet on the dashboard alphabetically. Yes, it’s that simple! And it’s totally undocumented. Special thanks to the one and only Tableau Jedi Mark Rueter for this tip! But note that Tableau orders upper case before lower case. - What I did was float a sheet named AExport onto the dashboard. I changed the height to 1 and made everything white and transparent and chose Fit Entire View so that it would be inconspicuous. I had to name it with a capital A so that it would be the first sheet alphabetically on the dashboard.
The AExport worksheet started off like this:
Basically, you can put anything you want on this sheet. I then changed the transparency to 0% on the Color shelf, changed the default worksheet color to white, removed the row banding and removed the row and column dividers. The worksheet now looks like this:
- Create a worksheet that you want to export.
- Remove all of the formatting to make it look invisible.
- Be sure to give it a name that makes it first alphabetically on the dashboard.
- Place the worksheet on the dashboard, float it, make it fit the entire view, make it really small, move it somewhere inconspicuous.
- 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.
This is a game changer!! Download the sample workbook here.
November 1, 2012
Tableau Tip: Passing filters in a URL (to create a dynamic report in PowerPoint)
Monday I showed how to embed an image of a Tableau Dashboard in PowerPoint that updates dynamically.
This process can actually have a much broader use if you customize the URL to include filters. Let’s look at an example.
Assume you’ve created this sales dashboard.
Notice that there are a few filter options on the right. Your goal is to build a PowerPoint for your regional sales teams, but you don’t want them to see each other’s information. You have a couple of options:
The link for the image for the whole dashboard is https://[YourTableauServerURL]/views/OneMinuteDashboard/OneMinuteDashboard.png. And the resulting image looks like this:
If you want a page for the Central team, you simply add ?Region=Central to the end of the URL if you are using Tableau Server. The URL now looks like this:
https://[YourTableauServerURL]/views/OneMinuteDashboard/OneMinuteDashboard.png&Region=Central
Notice how the Region is filtered to Central. You could embed this into PowerPoint, then duplicate the PowerPoint file and change to image to the East, etc.
You can include as many filters as you want by adding an ampersand (&) then whatever else you want to filter. The filter has to be in the format filter_name=value.
If I want a page for each Order Priority for Central, then all I do is add &Order Priority=Critical to the URL. Then replace this with High, then Medium, etc. In this example, the URL would now look like this:
https:/[YourTableauServerURL]/views/OneMinuteDashboard/OneMinuteDashboard&Region=Central&Order%20Priority=Critical
And the resulting image looks like this:
Do you need to show the quick filters using this technique? No, but for me it makes the image more clear to the reader to do so. You could remove the quick filters and have the title update based on the filters. That would look good.
Finally, if you want to include multiple selections from a filter, perhaps Critical and High, then you simply add ,High to the URL.
https://[YourTableauServerURL]/views/OneMinuteDashboard/OneMinuteDashboard.png?Region=Central&Order%20Priority=Critical,High
The image now looks like this:
The filtering options are pretty endless. All you need to remember is the format for adding a filter to a URL:
This process can actually have a much broader use if you customize the URL to include filters. Let’s look at an example.
Assume you’ve created this sales dashboard.
- Create a separate dashboard for each region. Terrible idea! Way too many charts to maintain.
- Add user level security. This is easy to do with Tableau Server, but there are lots of companies that can’t afford Tableau Server. So that option could be out the window.
- Create filtered URLs and embed those in the PowerPoint via the instructions from Monday.
The link for the image for the whole dashboard is https://[YourTableauServerURL]/views/OneMinuteDashboard/OneMinuteDashboard.png. And the resulting image looks like this:
If you want a page for the Central team, you simply add ?Region=Central to the end of the URL if you are using Tableau Server. The URL now looks like this:
https://[YourTableauServerURL]/views/OneMinuteDashboard/OneMinuteDashboard.png&Region=Central
Notice how the Region is filtered to Central. You could embed this into PowerPoint, then duplicate the PowerPoint file and change to image to the East, etc.
You can include as many filters as you want by adding an ampersand (&) then whatever else you want to filter. The filter has to be in the format filter_name=value.
If I want a page for each Order Priority for Central, then all I do is add &Order Priority=Critical to the URL. Then replace this with High, then Medium, etc. In this example, the URL would now look like this:
https:/[YourTableauServerURL]/views/OneMinuteDashboard/OneMinuteDashboard&Region=Central&Order%20Priority=Critical
And the resulting image looks like this:
Do you need to show the quick filters using this technique? No, but for me it makes the image more clear to the reader to do so. You could remove the quick filters and have the title update based on the filters. That would look good.
Finally, if you want to include multiple selections from a filter, perhaps Critical and High, then you simply add ,High to the URL.
https://[YourTableauServerURL]/views/OneMinuteDashboard/OneMinuteDashboard.png?Region=Central&Order%20Priority=Critical,High
The image now looks like this:
The filtering options are pretty endless. All you need to remember is the format for adding a filter to a URL:
?filter_name=valueI’ve created a PowerPoint with a page for each region here.
Subscribe to:
Posts
(
Atom
)