Adv Tableau
Adv Tableau
INSERT INTO EMPLOYEE VALUES (101, 'John Doe', '123 Elm St', 'M', 60000, NULL, 1);
INSERT INTO EMPLOYEE VALUES (102, 'Jane Smith', '456 Oak St', 'F', 75000, 101, 2);
INSERT INTO EMPLOYEE VALUES (103, 'Mike Johnson', '789 Pine St', 'M', 50000, 101, 1);
INSERT INTO EMPLOYEE VALUES (104, 'Emily Davis', '135 Maple Ave', 'F', 72000, 102, 3);
1. Prepare Your Workbook: Ensure all visualizations, dashboards, and stories are final.
2. Sign In to Tableau Public:
• Go to File > Save to Tableau Public As ...
• Sign in to your Tableau Public account (or create one if you don't have it).
3. Publish the Workbook:
• Name your workbook and click Save
• Tableau Public will upload your workbook and create a URL that you can share.
• Note: All data on Tableau Public is publicly accessible.
1. Publishing to Tableau Server or Tableau Online (Secure, Subscription-Based)
1. Connect to Tableau Server:
• Go to Server > Sign In and enter your Tableau Server or Tableau Online credentials.
2. Publish the Workbook:
• Go to Server > Publish Workbook ...
• Choose the project on the server where you want to save the workbook.
3. Set Permissions:
• Customize permissions for who can view, edit, or download the workbook.
4. Configure Extract Refresh (Optional):
• Schedule automatic data refreshes if you're using extracts.
5. Publish:
• Click Publish. You'll receive a URL to access and share your dashboard securely.
2. Embedding in a Website or Application
1) Copy Embed Code:
• After publishing to Tableau Public, Server, or Online, go to the workbook and click Share.
• Copy the Embed Code.
2) Paste Embed Code:
• Insert the code into your website's HTML where you want the visualization to appear.
• Adjust dimensions in the embed code if necessary.
3. Exporting as an Image, PDF, or PowerPoint
1) Export as Image:
• Go to File > Export As Image ... to save a specific sheet or dashboard as a PNG file.
2) Export as PDF:
• Go to File > Print to PDF ... to export selected sheets or dashboards to a PDF document.
3) Export to PowerPoint:
• Go to File > Export as PowerPoint ... to generate a PowerPoint file with each sheet or
dashboard on a separate slide.
4. Sharing via Tableau Mobile
For Mobile Access: Users can view published workbooks on their mobile devices through the
Tableau Mobile app, which can connect to Tableau Online or Tableau Server. This makes
dashboards accessible on the go, with interactive capabilities.
5. Create advanced mapping
Aim
1. Point-to-Point Map
A Point-to-Point Map visualizes connections between two geographic locations (e.g., from
one city to another), often used to represent routes or networks.
A dual-axis map is a map with two sets of geographic data overlaid on top of one another.
For example, a filled map of U.S. states with data points for each city layered on top.
Steps:
2. In the Connect pane, under Saved Data Sources, connect to the Sample-Superstore data
source.
3. In the Data pane, under Dimensions, double-click State. A map view is created.
4. On the Marks card, click the Mark Type drop-down and select Map.
5. From the Data pane, under Measures, drag Sales to Color on the Marks card. The map
updates to show the sum of sales by state. The states with higher sales are darker blue,
and the states with fewer sales are lighter blue.
8. From the Data pane, under Dimensions, drag Region to Color on the Marks card. The
map view on the left updates
9. On the Columns shelf, right-click the Longitude (generated) field on the right and select
Dual Axis. The map views are now overlapping each other. You might not be able to see
the map on the bottom layer.
10. On the Marks card, ensure that the bottom Longitude (generated) tab is selected, and
then click Color > Edit Colors.
11. In the Edit Colors dialog box that opens, click the Palette drop-down, select Gray, and
then click OK.Notice that the colors of the map update.
12. On the Marks card, click Color again.
13. In the Color pop-up dialog box, under Opacity, move the slider to approximately 75%.
Aim:
To calculate the distance between two geographic points on a map in Tableau, allowing for accurate
such as routes or connections, using the built-in DISTANCE() function or a custom Haversine
SQL CODE:
DISTANCE(
MAKEPOINT([Start_Lt], [Start_Ln]),
MAKEPOINT([Dest_Lt], [Dest_Ln]),
"kilometers"