如何在网络上发布后从 sql 服务器插入数据以支持双图

how to insert data from sql server to power bi graph after publish on web

我在我的项目中使用 power bi 报告,但我需要根据 SQL 服务器数据更改我的图表。这意味着当我们将在 SQL 服务器中插入新数据时,它会影响我的图表。

您可以使用本地网关使用本地数据(如 SQL 服务器数据)刷新已发布的 Power BI 数据集中的数据。看看https://powerbi.microsoft.com/en-us/gateway/

网关是免费的,有个人风格和企业风格,它应该 运行 在始终开启的机器上,这样您就可以安排自动刷新数据。

Microsoft 已经给出了相关的 Documentation

SQL Server Analysis Services live data in Power BI

In Power BI, there are two ways you can connect to a live SQL Server Analysis Services server. In Get data, you can connect to a SQL Server Analysis Services server, or you can connect to a Power BI Desktop file, or Excel workbook, that already connects to an Analysis Services server.

Important :

  • In order to connect to a live Analysis Services server, an On-premises Data Gateway must be installed and configured by an administrator. For more information, see On-premises Data Gateway.

  • When you use the gateway, your data remains on-premises. The reports you create based on that data are saved in the Power BI service.

  • Q&A natural language querying is in preview for Analysis Services live connections.

To connect to a model from Get data

  1. In My Workspace, select Get data. You can also change to a group workspace, if one is available.

  1. Select Databases & More.

  1. Select SQL Server Analysis Services > Connect.

  1. Select a server. If you don't see any servers listed here, it means either a gateway, and data source, are not configured, or your account is not listed in the Users tab of the data source, in the gateway. Check with your adminsitrator.

  2. Select the model you want to connect to. This could be either Tabular or Multidimensional.

After you connect to the model, it will appear in your Power BI site in My Workspace/Datasets. If you were swtiched to a group workspace, then the dataset will appear within the group.