0
0
Tableaubi_tool~8 mins

Database connections (SQL Server, PostgreSQL) in Tableau - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - Database connections (SQL Server, PostgreSQL)
Dashboard Goal

Understand how to connect Tableau to SQL Server and PostgreSQL databases to create live data visualizations.

Sample Data
OrderIDCustomerRegionSalesOrderDate
1001AliceEast2502024-01-15
1002BobWest4502024-01-20
1003CharlieEast3002024-02-05
1004DianaSouth1502024-02-10
1005EvaWest5002024-03-01
Dashboard Components
  • Connection Setup Panel: Shows steps to connect Tableau to SQL Server and PostgreSQL databases.
  • Total Sales KPI Card: Displays total sales from connected database.
    Formula: SUM([Sales])
    Result: 1650
  • Sales by Region Bar Chart: Visualizes sales grouped by region.
    SQL Query example:
    SELECT Region, SUM(Sales) AS TotalSales FROM Orders GROUP BY Region;
    Chart shows East: 550, West: 950, South: 150
  • Recent Orders Table: Lists recent orders with OrderID, Customer, Sales, and OrderDate.
Dashboard Layout
+---------------------------+---------------------------+
| Connection Setup Panel     | Total Sales KPI Card      |
| (Instructions)            | (Big number: 1650)        |
+---------------------------+---------------------------+
| Sales by Region Bar Chart                          |
| (Bar chart with 3 bars)                            |
+---------------------------------------------------+
| Recent Orders Table                                |
| (Table with 5 rows)                               |
+---------------------------------------------------+
  
Interactivity

Filters for Region and OrderDate allow users to update all components simultaneously:

  • Selecting a region filters the bar chart, KPI card, and recent orders table to that region's data.
  • Choosing a date range updates all components to show only orders within that period.
Self Check

If you add a filter for Region = West, which components update and what changes occur?

  • Total Sales KPI Card: Updates to show total sales for West region only (950).
  • Sales by Region Bar Chart: Shows only the West bar with sales 950.
  • Recent Orders Table: Lists only orders from West region (OrderID 1002 and 1005).
Key Result
A Tableau dashboard demonstrating live connections to SQL Server and PostgreSQL with sales KPIs, regional sales chart, and recent orders table.