Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Applies to: ✅ SQL database in Microsoft Fabric
In this tutorial, learn how to use multiple tools to analyze data stored in your SQL database in Fabric or the SQL analytics endpoint.
Prerequisites
- Complete all the previous steps in this tutorial.
Find the connection strings to the SQL database
To get your server and database name, open your SQL database in Fabric portal view and select the Settings button in the icon bar.
Note
The SQL database in Fabric and its SQL analytics endpoint have different connection strings. For this tutorial step, connect to the SQL database. You'll use the SQL analytics endpoint in the next tutorial step.
Select Connection Strings and you'll see a long string that starts with Data Source... From there, select the text between the characters tcp: through the characters ,1433. Ensure that you select the entire set of characters there and nothing more for the server name.
For the database name, select all the characters between the characters Initial Catalog= and ;MultipleActiveResultSets.
You can now use these SQL strings in your connection area for tools such as Power BI or SQL Server Management Studio. For Visual Studio Code with the MSSQL extension, you can paste the entire connection string in the first text box where you make a database connection, so you don't have to select only the server and database names.
Power BI visualization creation
To analyze the data in your SQL analytics endpoint in Power BI, create a semantic model that provides a logical view of your data, including the tables, relationships, and measures used for analysis. After creating the semantic model, customize it to meet your analytical requirements.
In your SQL analytics endpoint view, select the New semantic model button in the ribbon.
From the resulting view, provide a name for your semantic model. Select all tables and the views created in the previous tutorial, including
SupplyChain.vTotalProductsByVendorLocation, and select Confirm.From the resulting view, zoom in and scroll over until you see the
vTotalProductsByVendorLocationobject. Select it.In the properties, select the Location field, and expand the Advanced properties selection. You might need to scroll to find it. Set the value of Summarize by to None. This ensures that when the field is used, it's a discrete number, not a mathematical summarization of that number.
Create a report
In the semantic model view, use the menu option for New report. Create a report based on the views you created in the SQL analytics endpoint in a previous tutorial step.
Select the New report button in the ribbon.
Expand the
vTotalProductsByVendordata object. Select each of the fields you see there. The report takes a moment to gather the results to a text view. You can size this text box if desired.Select in a blank area of the report canvas, and then select Location in the Data fields area.
Select a value in the box you just created – notice how the first selection of values follows the selection you make in the second box. Select that same value again to clear the selection.
Select in a blank area of the reporting canvas, and then select the Supplier field.
Once again, you can select the name of a supplier and the first selection shows the results of just that supplier.
Save the Power BI item for sharing
You can save and share your report with other people in your organization.
Select the Save button in the icon box and name the report suppliers_by_location_report, and ensure you select the correct Workspace for this tutorial.
Select the Share button in the icon bar to share the report with people in your organization who have access to the proper data elements.