0
0
Power BIbi_tool~8 mins

SQL Server connection in Power BI - Dashboard Guide

Choose your learning style9 modes available
Dashboard Mode - SQL Server connection
Business Question

How can we connect Power BI to a SQL Server database to load sales data and create a simple report?

Sample Data from SQL Server
OrderIDCustomerRegionSalesAmountOrderDate
1001Alpha CoEast2502024-01-15
1002Beta LLCWest4002024-01-20
1003Gamma IncEast1502024-02-05
1004Delta LtdSouth3002024-02-10
1005EpsilonWest5002024-03-01
Dashboard Components
  • KPI Card: Total Sales
    Formula: Total Sales = SUM('Sales'[SalesAmount])
    Result: 1600
  • Bar Chart: Sales by Region
    X-axis: Region
    Y-axis: Sum of SalesAmount
    Shows total sales per region (East: 400, West: 900, South: 300)
  • Table: Sales Details
    Columns: OrderID, Customer, Region, SalesAmount, OrderDate
    Shows all rows from the SQL Server data
Dashboard Layout
+----------------------+----------------------+
| Total Sales | Sales by Region |
| (KPI Card) | (Bar Chart) |
+----------------------+----------------------+
| Sales Details Table |
+--------------------------------------------------+
Interactivity

A slicer filter on Region allows users to select one or more regions. When a region is selected:

  • The Total Sales KPI updates to show sales only for the selected region(s).
  • The Sales by Region bar chart updates to show bars only for the selected region(s).
  • The Sales Details table filters to show only orders from the selected region(s).
Self Check

If you add a filter selecting Region = West, which components update and what are their new values?

  • Total Sales: Updates to 900 (400 + 500)
  • Sales by Region Chart: Shows only the West region bar with value 900
  • Sales Details Table: Shows only orders 1002 and 1005
Key Result
Power BI dashboard showing total sales, sales by region, and sales details connected live to SQL Server data.