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.
  • Do not grab the OData V4 URL value!
  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. Click OK.
    2. Click Basic.
  •  
    1. Fill in the following fields:
      • User name: Your development sandbox username.
      • Password: The web services access key you generated for the user in the Enabling basic authentication recipe earlier in this chapter:

    1. Click Connect.
    2. Click Load.
  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:

    1. In the left sidebar of Power BI Desktop, select the Data () icon.
    2. Find and select the Sales_LCY column.
    3. Select Modelling | Formatting | Data type: Decimal Number.
    4. Click Yes on the confirmation dialog.
    5. Repeat steps 2-4 for the Balance_Due_LCY column.
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:

    1. With the visualization selected, on the right side of the Power BI Desktop window, drag and drop the Axis: Name and Value: Sales_LCY, Balance_Due_LCY fields into the appropriate sections:

    1. Select your visualization and drag the edge out to make it larger. It should look similar to the following:

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

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.149.242