How to do it...

  1. Log in to your development sandbox with your web browser.
  2. Use the  icon, search for Web Services, and click the link to open the page.
  3. Let's publish a web service so we can see customer data in Power BI:
    1. Click the  action button.
    2. In the list, in the new row, enter the following information:
      • Object Type: Page
      • Object ID: 22
      • Service Name: customersdemo
      • Published: Yes (place a check mark in this column)
    3. Click the  action button.
    4. Click the  action button and search for customersdemo:
      • You only see the entry that we created in the list.
  1. Select the entry in the list and copy/paste the value into the OData URL column to Notepad for later.
  1. Close the Web Services page.

Remember that you can also publish web services with your Business Central application automatically to save your users' time! See the Publishing your own web service recipe earlier in this chapter for information on how to do it.
  1. Open Power BI Desktop.
  2. Let's get connected to the web service that we published in Business Central:
    1. On the welcome screen, select .
    2. Select All | OData Feed.
    3. Click Connect.
    4. In the OData feed dialog, make sure that Basic is selected, and paste in the OData URL you copied from Business Central:

  1. Now that we have made the connection to Business Central, Power BI has downloaded the contents of the web service we published. However, some of the data types have not been correctly identified for all fields.

We'll fix that up for a few of the fields:

Once you have told Power BI what type of data is in the columns, any time that the data is refreshed, it will enforce those rules.

  1. Now, let's build a simple visualization of the customer data:
    1. Click the Report () icon in the left sidebar in Power BI Desktop.
    2. Select Home | New Visual.
    3. With your new visualization selected, on the right side of the Power BI Desktop window, select the Clustered column chart type:

That's it! You've created a Power BI visualization using the customer data from your Business Central sandbox!