How To Use Azure SQL Database In Power BI Reports

Power BI supports multiple data sources like Excel, CSV files, Azure, etc.

Here we will see how to connect Azure SQL Database in Power BI desktop application.

Steps to do in Power BI desktop Application below,

  • Open Power BI desktop application.

    How to Use Azure SQL Database in Power BI Reports
  • Click on Get Data on the Top of the Menu Options and click on More… as highlighted below,

    How to Use Azure SQL Database in Power BI Reports
  • Then select Azure and in right side you will see first option which is Azure SQL database.

    How to Use Azure SQL Database in Power BI Reports
     
  • Click on Connect.

    How to Use Azure SQL Database in Power BI Reports

    Give Azure SQL Server Name from the Azure Portal like below,
    How to Use Azure SQL Database in Power BI Reports
    How to Use Azure SQL Database in Power BI Reports
  • Database Name is optional but if you want to give you can give the database name along with the Server name like below –
  • The same Database Name has been used here which you gave at the time of the creation of Azure Database Service in Azure from Azure portal.

In my case, it is Azure Database Name – powerbitestDb

  • Let's say you don’t give Database Name which is optional, you gave only Server Name then click on Ok button.
  • It will ask Database base authentication type
  • From which authentication type you want to login into Database.
  • In case of Azure SQL Database, you always have to Choose second option that is database, and give Username and Password which will be your SQL Server authentication type.

    How to Use Azure SQL Database in Power BI Reports
     
  • Once you give username and password click on Connect
  • Now you will be able to see your database name along with all the tables in that Database.
  • Select the tables from which you want to create a power bi report.
  • Let's say I will take two tables here – Sales.LT.Customer and Sales.LT.Product.
  • Click on Load.

    How to Use Azure SQL Database in Power BI Reports
     
  • This is how both the tables are now imported into your Power BI report which you can see in the right section (Fields column) in the Power BI Desktop application.

    How to Use Azure SQL Database in Power BI Reports
     
  • Now select a chart from the Visualization section, let's say a pie chart.
  • Select Rows/Column from the tables from the (Fields) Area from your choice which you wish to plot of the chart like below,

    How to Use Azure SQL Database in Power BI Reports
    So, I took Company Name from Sales LT Customer and another column from another table Say productId from Sales LT product.

    And this is how the Pie chart looks,

    How to Use Azure SQL Database in Power BI Reports
  • Save this chart with a meaningful name. This will save as .pbix file in your system.

    How to Use Azure SQL Database in Power BI Reports

Summary

This is how we can use Azure SQL Database in our Power BI reports.


Similar Articles