Databases and warehouses · data source guide

Azure SQL Database data in Power BI

Azure SQL Database is often the operational database behind a line-of-business app or the reporting database a data team maintains. Power BI connects to it directly, and query folding lets Power Query push filters and joins back to SQL.

Connector status

Connector in Microsoft's list

  • Azure SQL database

The Azure SQL database connector is listed for Excel, Power BI (semantic models) and Power Query Online, with import and DirectQuery.

Checked against Microsoft Learn's Power Query connector list on 5 November 2026. Connectors change; check the list before you build.

How to get Azure SQL Database data into Power BI

In order of preference for a report that refreshes on its own.

  1. 1

    Connect with Microsoft Entra ID

    Get data → Azure SQL database, enter the server and database, and sign in with a Microsoft account (Entra ID) rather than a SQL login where your organisation allows it.

  2. 2

    Allow Power BI through the firewall

    The database firewall must allow connections from Azure services or the relevant IP ranges; private endpoints need a virtual network data gateway.

  3. 3

    Keep query folding

    Do filters, column selection and joins as early Power Query steps so they fold into SQL. Right-click a step and check View Native Query to confirm.

  4. 4

    Read from views

    Ask the database owner for reporting views. They give a stable contract when tables change underneath.

Typical Azure SQL Database KPIs

Table and column names in the DAX are illustrative: rename them to match your model.

Orders today

Rows in the orders table for today (DirectQuery for near-real-time).

DAX
Orders Today = CALCULATE ( COUNTROWS ( Orders ), Orders[OrderDate] = TODAY () )

Revenue month to date

Standard time intelligence on a Date table.

DAX
Revenue MTD = TOTALMTD ( SUM ( Orders[Amount] ), 'Date'[Date] )

Average processing time

Minutes between two status timestamps.

DAX
Avg Processing (min) = AVERAGEX ( Orders, DATEDIFF ( Orders[CreatedAt], Orders[ShippedAt], MINUTE ) )

Error rate

Failed transactions divided by all transactions.

DAX
Error Rate = DIVIDE ( CALCULATE ( COUNTROWS ( Transactions ), Transactions[Status] = "Failed" ), COUNTROWS ( Transactions ) )

Active customers

Distinct customers with an order in the last 90 days.

DAX
Active Customers = CALCULATE ( DISTINCTCOUNT ( Orders[CustomerId] ), DATESINPERIOD ( 'Date'[Date], MAX ( 'Date'[Date] ), -90, DAY ) )

Modelling notes for Azure SQL Database

Templates for Azure SQL Database data

Free page layouts with a background, theme JSON and PBIP project. Swap the sample tables for your own queries.

Power BI visuals for Sales · Power BI visuals for Supply Chain · More by department: Operations templates · Sales templates · Supply chain templates

Visuals for Azure SQL Database KPIs

Chart types that suit these KPIs, with data shapes and example prompts.

Azure SQL Database and Power BI: questions

Can I use DirectQuery with Azure SQL Database?

Yes. The connector supports import and DirectQuery. DirectQuery runs queries on the database for every interaction, so check the load it adds.

Do I need a gateway?

Not for a database reachable from Azure services. Databases behind private endpoints need a virtual network data gateway or an on-premises data gateway in that network.

Related data sources

Other sources teams often combine with this one.

Azure SQL Database is a trademark of its owner. Product names are used only to describe compatibility; VizForge is not affiliated with, endorsed by or sponsored by the owner or by Microsoft.

Design the Azure SQL Database report page first

Lay out KPI cards and visual slots in the free Design Studio, then export the background, theme JSON and a PBIP project to bind to your data.

The design studio for Power BI. Free, in your browser, no sign-up.