使用 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 與 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