Friday, February 23, 2024

How to pull data from Azure SQL database in Power BI

 To pull data from an Azure SQL database into Power BI, you can follow these steps:

  1. Open Power BI Desktop: Launch Power BI Desktop on your computer.

  2. Get Data: In Power BI Desktop, click on the "Home" tab in the ribbon, then click on "Get Data."

  3. Choose Database: In the "Get Data" window, select "Azure" and then choose "Azure SQL Database," then click "Connect."

  4. Connect to Database: In the "Azure SQL Database" window, enter the server name, database name, and select the authentication method (usually either Windows or Database). If using Database authentication, enter your username and password. Click "OK."

  5. Query Editor: Power BI will connect to your Azure SQL Database and display a list of tables/views. Select the tables/views you want to import, then click "Load" or "Transform Data" to edit the data before loading it into Power BI.

  6. Transform Data (optional): You can perform data transformation operations in the Query Editor if needed, such as filtering rows, renaming columns, creating calculated columns, or merging tables.

  7. Load Data: After you have finished editing your data, click "Close & Load" to load the data into Power BI.

  8. Data Model: Power BI will import the data into the data model, where you can create visualizations and reports based on the imported data.

  9. Refresh Data: If your Azure SQL Database is regularly updated, you may want to set up scheduled data refresh in Power BI Service to ensure your reports stay up-to-date.

That's it! You have successfully pulled data from your Azure SQL Database into Power BI. Now you can create visualizations and reports based on this data.

No comments:

Post a Comment