How to Create a Power BI Dashboard from SQL Server

Cody Schneider9 min read

Building a powerful dashboard starts with connecting to your raw data, and for many businesses, that data lives in a SQL Server database. This article will guide you step-by-step through the process of connecting Power BI to SQL Server, cleaning up your data, and building your first interactive dashboard from scratch.

Before You Begin: What You'll Need

To successfully follow this tutorial, you’ll need just two things:

  • Power BI Desktop: This is the free application from Microsoft used to create reports and dashboards. If you don't have it, you can download it directly from the Microsoft Store on your Windows computer.
  • SQL Server Access Credentials: You need the name of the SQL Server you're connecting to, the name of the database, and the necessary permissions to read the data. This might be your Windows login or a specific username and password provided by your IT team or database administrator.

Step 1: Connecting Power BI to Your SQL Server Database

The first step is establishing a connection between Power BI and your SQL database. Power BI has a native connector that makes this process straightforward.

Open Power BI Desktop. In the main ribbon at the top, click on the Get Data button. A dropdown menu will appear, select SQL Server from the list of common data sources.

A dialog box will appear asking for a few key details:

  1. Server: Enter the name of your SQL Server instance here. This could be an IP address, a server name like MyServer\SQLEXPRESS, or a local name like localhost.
  2. Database (Optional): You can specify the database you want to connect to. It's a good practice to fill this in, but if you leave it blank, Power BI will connect to the server's default database.

Before you click OK, you need to make an important decision about the Data Connectivity mode.

Choosing Between Import and DirectQuery

Power BI gives you two main ways to connect to your SQL data: Import and DirectQuery. Understanding the difference is critical for dashboard performance.

  • Import Mode: This is the default option and the most commonly used. Power BI copies a snapshot of your data from SQL Server and stores it within your Power BI file (.pbix).
  • DirectQuery Mode: With this option, Power BI does not store a copy of the data. Instead, it sends a query directly to your SQL Server database every time a user interacts with a visual on the dashboard.

For this tutorial, let's stick with Import mode, *as it's the more common and performant option for general business reporting. After selecting Import, click OK. You may be asked to provide your credentials (either your Windows login or a specific SQL Server username and password).

Step 2: Selecting Tables in the Navigator

Once you connect successfully, the Navigator window will appear. This window shows you all the tables and views available in the database you connected to. It’s like a menu for your data.

Browse through the list on the left and check the boxes next to the tables you need for your dashboard. As you click on a table name, a preview of its data will be shown on the right. This is helpful for confirming you’re selecting the right information.

Once you’ve selected your tables, look at the bottom right corner of the window. You have two choices:

  • Load: This option loads your data directly into Power BI's data model as-is. It’s a fast way to get started if you know your data is perfectly clean.
  • Transform Data: This is the recommended choice. Clicking this opens the Power Query Editor, a powerful tool for cleaning, shaping, and preparing your data before it gets loaded into your model.

Always lean towards using Transform Data. Raw data is rarely perfect, and spending a few minutes cleaning it up now will save you hours of headaches later. Click it to proceed.

Step 3: Cleaning and Preparing Data in Power Query

Welcome to the Power Query Editor. Think of this as your data-cleaning workshop. Any changes you make here are recorded as "Applied Steps" on the right-hand panel, creating a repeatable process for every future refresh.

Here are a few common data cleaning tasks you might perform:

  • Remove Unnecessary Columns: Your tables might include dozens of columns you don't need for your dashboard. Right-click the header of a column you don't need and select Remove. This makes your dataset smaller and easier to work with.
  • Check Data Types: Power Query usually does a good job of guessing data types, but you should always verify. Make sure numerical columns are set to "Decimal Number" or "Whole Number," date columns are "Date" or "Date/Time," and text columns are "Text." You can change the type by clicking the icon on the left of the column header.
  • Filter Rows: If your tables contain old or irrelevant data, you can filter it out. For example, you might want to only include sales data from the last two years. Use the filter dropdown arrow on a column header, similar to how you would in Excel.
  • Replace Values or Handle Nulls: Sometimes data contains inconsistencies (e.g., "USA" vs. "United States"). Use the "Replace Values" feature to standardize your data. For blank or null values, you can right-click the column and choose to replace them with zero or another placeholder.

Once you are happy with the shape of your data, click the Close & Apply button in the top-left corner of the Power Query Editor. Power BI will apply your steps and load the clean data into the data model.

Step 4: Creating Relationships in the Model View

If you loaded more than one table, you need to tell Power BI how they relate to each other. This is essential for creating meaningful multi-table analysis, like filtering sales by product category.

Click on the Model view icon on the left side of the Power BI window (it looks like three connected boxes). You’ll see graphical representations of your tables.

Power BI often automatically detects relationships based on column names (e.g., if you have ProductID in both your 'Sales' and 'Products' table). If a relationship wasn’t created or you need to make one manually, simply click and drag the common field from one table and drop it onto the corresponding field in the other table. A line will appear connecting them, indicating a relationship has been formed.

Step 5: Building Your Dashboard Visuals

This is where your dashboard comes to life. Click on the Report view icon (it looks like a bar chart) to return to the main canvas.

On the right side of the screen, you will see three key panes:

  • Fields: This lists all your tables and the columns within them.
  • Visualizations: A palette of all the different chart and graph types available.
  • Filters: Where you can apply filters to the entire page, a specific visual, or your whole report.

Let's build a few common visuals:

1. Display a KPI with a Card

Cards are perfect for showing big, important numbers.

  1. Click on the Card icon in the Visualizations pane.
  2. From your Sales table in the Fields pane, find your sales amount column (e.g., OrderTotal) and drag it into the "Fields" well of the Card visual.

You'll instantly see the total sum of sales.

2. Compare Categories with a Bar Chart

Let's see which product categories are top performers.

  1. Click a blank space on your canvas, then select the Stacked bar chart icon.
  2. From your Products table, drag the Category column to the "Y-axis" well.
  3. From your Sales table, drag the OrderTotal column to the "X-axis" well.

A bar chart will appear showing total sales broken down by category.

3. Track Trends with a Line Chart

Let's visualize sales over time.

  1. Click another blank area and select the Line chart icon.
  2. From your Sales table, drag your OrderDate column to the "X-axis" well.
  3. From the same Sales table, drag OrderTotal to the "Y-axis" well.

Power BI automatically creates a date hierarchy, letting you drill down from year to quarter, month, and day.

Step 6: Add Interactivity with Slicers

A dashboard's real power lies in its interactivity. Slicers are filters that users can click to slice and dice the data.

  1. Click on the Slicer icon in the Visualizations pane.
  2. From your Sales table, drag the OrderDate field into the "Field" well.

This creates a handy date range slicer. Now you or your users can adjust the slider to see how all the visuals on the page update automatically for the selected time period.

Step 7: Publish to Power BI Service

Once your dashboard is complete, you’ll want to share it with your team. To do this, you publish it from Power BI Desktop to the Power BI Service (the cloud-based version).

In the Home ribbon of Power BI Desktop, click the Publish button. You’ll be prompted to save your work and select a workspace to publish to. After a few moments, your dashboard will be available online, ready to be shared via a secure link with your colleagues.

Final Thoughts

This guide walked you through the full process of creating a dynamic dashboard in Power BI using a SQL Server database. By establishing a connection, cleaning your data in Power Query, building a model, and visualizing the results, you’ve turned raw database tables into an interactive, insightful report.

The journey from raw data to a finished dashboard, while powerful, often involves navigating multiple tools and interfaces, from connection dialogs to the Power Query editor. At Graphed, we've streamlined this process. We let you connect your data sources like SQL Server in seconds and then build dashboards simply by describing what you want to see in plain English. No need to manually clean columns, define relationships, or drag-and-drop every visual - just ask, and your real-time dashboards appear. If you want to get insights without the learning curve, give Graphed a try.

Related Articles

How to Connect Facebook to Google Data Studio: The Complete Guide for 2026

Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.

Appsflyer vs Mixpanel​: Complete 2026 Comparison Guide

The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.