使用 Power BI 连接到 Microsoft Dynamics NAVConnect to Microsoft Dynamics NAV with Power BI

借助 Power BI,轻松获得有关 Microsoft Dynamics NAV 数据的见解。Getting insights into your Microsoft Dynamics NAV data is easy with Power BI. Power BI 会检索数据(销售和财务数据),然后基于该数据生成带仪表板和报表的应用。Power BI retrieves your data, both Sales and Financial, then builds an app with a dashboard and reports based on that data. Power BI 需要具有对从中检索数据(在本例中为销售和财务数据)的表的访问权限。Power BI needs your permissions to the tables where data is retrieved from, in this case sales and finance data. 以下是有关要求的详细信息。More details on requirements below. 安装应用后,可以在 Power BI 服务 (https://powerbi.com) 和 Power BI 移动应用中查看仪表板和报表。After you install the app, you can view the dashboard and reports in the Power BI service (https://powerbi.com), and in the Power BI mobile apps.

连接到用于 Power BI 的 Microsoft Dynamics NAV 或阅读有关使用 Power BI 进行 Microsoft Dynamics NAV 集成的详细信息。Connect to the Microsoft Dynamics NAV for Power BI or read more about the Dynamics NAV integration with Power BI.

如何连接How to connect

  1. 选择左侧导航窗格中的“应用”,然后选择右上角的“获取应用”。Select Apps in the left navigation pane > select Get apps in the upper-right corner.

    “获取应用”图标

  2. 在 AppSource 中,选择“应用”选项卡,然后搜索所需的服务。In AppSource, select the Apps tab, and search for the service you want.

    AppSource 中的“应用”选项卡

  1. 选择 Microsoft Dynamics NAV,然后选择 获取Select Microsoft Dynamics NAV, then select Get.
  2. 出现提示时,请输入你的 Microsoft Dynamics NAV OData URL。When prompted, enter your Microsoft Dynamics NAV OData URL. URL 应与以下模式相匹配:The URL should match the following pattern:

    https//instance.navserver.com:7048/DynamicsNAV90_Instance1/OData/Company('CRONUS%20International%20Ltd.')

    • NAV 服务器名称应与“instance.navserver.com”相匹配"instance.navserver.com" with your NAV Server name
    • NAV 服务器实例名称应与“DynamicsNAV90_Instance1”相匹配"DynamicsNAV90_Instance1" with your NAV Server Instance name
    • NAV 公司名称应与“Company('CRONUS%20International%20Ltd.')”相匹配"Company('CRONUS%20International%20Ltd.')" with your NAV Company name

      获取此 URL 的一个简单的方法是在 Dynamics NAV 中转到 Web 服务,找到 powerbifinance Web 服务并复制 Odata URL,但是省去此 URL 字符串中的“/powerbifinance”。An easy way to obtain this URL is in Dynamics NAV to go to Web Services, find the powerbifinance web service and copy the OData URL, but leaving out the “/powerbifinance” from the URL string.

  3. 选择基本并输入你的 Microsoft Dynamics NAV 凭据。Select Basic and enter your Microsoft Dynamics NAV credentials.

    你需要 Microsoft Dynamics NAV 帐户的管理员凭据(或至少对销售和财务数据的访问权限)。You need admin credentials (or at least permissions to sales and finance data) for your Microsoft Dynamics NAV account. 当前仅支持基本(用户名和密码)身份验证。Only Basic (Username and Password) authentication is currently supported.

  4. Power BI 会检索 Microsoft Dynamics NAV 数据,并为你创建随时可用的仪表板和报表。Power BI will retrieve your Microsoft Dynamics NAV data and create a ready-to-use dashboard and report for you.

查看仪表板和报表View the dashboard and reports

导入完成后,新的应用将显示在“应用”页上。When the import is complete, the new app will appear on the Apps page.

  1. 选择左侧导航窗格中的“应用”,然后选择应用。Select Apps in the left navigation pane > select the app.

    左侧导航窗格中的“应用”

  2. 可以通过在问答框中键入来提出问题,或单击磁贴打开基础报表。You can ask a question by typing in the Q&A box, or click a tile to open the underlying report.

下一步?What now?

  • 在仪表板顶部,尝试在“问答”框中提问Try asking a question in the Q&A box at the top of the dashboard.
  • 选择磁贴以打开基础报表。Select a tile to open the underlying report.
  • 可以筛选和突出显示报表中的数据,但不能保存所做的更改。You can filter and highlight the data in the report, but you can't save your changes.
  • 计划每日刷新数据集。Your dataset is scheduled to refreshed daily. 可以更改刷新计划或根据需要使用“立即刷新”来尝试刷新。You can change the refresh schedule or try refreshing it on demand using Refresh Now.

包含的内容What's included

仪表板和报表包含下表中的数据(区分大小写):The dashboard and reports contain data from the following tables (case sensitive):

  • ItemSalesAndProfitItemSalesAndProfit
  • ItemSalesByCustomerItemSalesByCustomer
  • powerbifinancepowerbifinance
  • SalesDashboardSalesDashboard
  • SalesOpportunitiesSalesOpportunities
  • SalesOrdersBySalesPersonSalesOrdersBySalesPerson
  • TopCustomerOverviewTopCustomerOverview

系统要求System requirements

若要将 Microsoft Dynamics NAV 数据导入到 Power BI 中,则需要具有对从中检索数据的销售和财务数据表(上面已列出)的访问权限。To import your Microsoft Dynamics NAV data into Power BI, you need to have permissions to the sales and finance data tables where data is retrieved from (listed above). 表中需要具有一些数据,当前不能导入空表。The tables are also required to have some data, empty tables will currently fail to import.

故障排除Troubleshooting

Power BI 使用 Microsoft Dynamics NAV 的 Web 服务来检索数据。Power BI uses Microsoft Dynamics NAV's web services to retrieve your data. 如果 Microsoft Dynamics NAV 实例中有大量数据,将 Web 服务使用情况影响降到最低的建议:按需更改刷新频率。If you have a lot of data in your Microsoft Dynamics NAV instance, a suggestion to minimize the impact on your web service usage is to change the refresh frequency depending on your needs. 另一个建议是让一个管理员创建应用并进行共享,而不是让每个管理员都创建自己的应用。Another suggestion is to have one admin create the app and share it instead of having every admin create their own.

“参数验证失败,请确保所有参数都是有效的”"Parameter validation failed, please make sure all parameters are valid"
如果在键入 Microsoft Dynamics NAV URL 后看到此错误。If you see this error after typing your Microsoft Dynamics NAV URL. 请确保满足以下要求:Make sure the following requirements are satisfied:

  • URL 完全采用这种模式:The URL follows exactly this pattern:

    https//instance.navserver.com:7048/DynamicsNAV90_Instance1/OData/Company('CRONUS%20International%20Ltd.')

    • NAV 服务器名称应与“instance.navserver.com”相匹配"instance.navserver.com" with your NAV Server name
    • NAV 服务器实例名称应与“DynamicsNAV90_Instance1”相匹配"DynamicsNAV90_Instance1" with your NAV Server Instance name
    • NAV 公司名称应与“Company('CRONUS%20International%20Ltd.')”相匹配"Company('CRONUS%20International%20Ltd.')" with your NAV Company name
  • 请确保所有字母均为小写。Make sure all the letters are lower case.
  • 请确保该 URL 采用“https”。Make sure the URL is in 'https'.
  • 请确保此 URL 的末尾没有尾随正斜杠。Make sure there are no trailing forward slash at the end of the URL.

“登录失败”"Login failed"
如果在使用 Microsoft Dynamics NAV 凭据登录后收到“登录失败”的错误,你则可能遇到了以下的其中一个问题:If you get a "login failed" error after using your Microsoft Dynamics NAV credentials to login, then you may be hitting one of the following issues:

  • 你使用的帐户没有权限从你的帐户中检索 Microsoft Dynamics NAV 数据。The account you are using doesn't have permissions to retrieve the Microsoft Dynamics NAV data from your account. 验证其是否为管理员帐户,然后重试。Verify it is an admin account and try again.
  • 当前正在尝试连接的 Dynamics NAV 实例不具有有效的 SSL 证书。The Dynamics NAV instance you're trying to connect to doesn't have a valid SSL certificate. 在这种情况下,你将看到更详细的错误消息(“无法建立受信任的 SSL 关系”)。In this case you'll see a more detailed error message ("unable to establish trusted SSL relationship"). 请注意,不支持自签名的证书。Note that self-signed certs are not supported.

“糟糕”"Oops"
如果你在通过身份验证对话框后看到“糟糕”的错误对话框,则说明 Power BI 在加载数据时遇到了问题。If you see an "Oops" error dialog after you pass the authentication dialog box, Power BI is running into an issue while loading the data.

  • 请验证 URL 已采用上面指定的模式。Verify the URL follows the pattern specified above. 一个常见错误是指定:A common mistake is to specify:

    https//instance.navserver.com:7048/DynamicsNAV90\_Instance1/OData

    正确的做法是将与你的 NAV 公司名称匹配的“Company('CRONUS%20International%20Ltd.')”部分包含在内:However, you need to include the 'Company('CRONUS%20International%20Ltd.')' section with your NAV Company name:

    https//instance.navserver.com:7048/DynamicsNAV90\_Instance1/OData/Company('CRONUS%20International%20Ltd.')

后续步骤Next steps