Skip to main content
Mitratech Success Center
Client Support Center

Need help? Click a product group below to select your application and get access to knowledge articles, webinars, training content, and release notes or to contact our support team.

Authorized users - log in to create a ticket, view tickets status and check your success plan details.

 

Using API for Analytics and Visualizations

This article explains how to extract data from an IMS View into Power BI, using the Export to Excel API that is available for views.

Step 1 - IMS View

  • Create a view in IMS that has the columns and filters that contain the data you want to make available in Power BI:

clipboard_e75488ab635306df1d70013929f177ec0.png

  • The view will have its own URL:

http://<servername>:9877/C7IMS/#/bu-1/inventory/viewgroup-1/view-1

  • The URL will have three unique identifiers:
    • Business Unit (bu-1)
    • View Group (viewgroup-1)
    • View (view-1)

Step 2 - Power BI Report

  • Create a new report in Power BI
  • Click on Transform data > Transform data

clipboard_ed75ae805f2d3bf3d95a568c348ff0ea9.png

  • Click on Manage Parameters:

clipboard_e6d97eed2be827ad3a231416fd33cc1e8.png

  • Create four parameters:
Name Description Required Type Suggested Values Current Value (examples)
SiteUrl Copy the value from the url which states the server name Yes Text Any value http://<servername>:9877/
BusinessUnitID Copy the value from the url which states bu-<number> Yes Text Any value 1
ViewGroupId Copy the value from the url which states viewgroup-<number> Yes Text Any value 1
ViewId Copy the id from the number in the url where it states view-<number> Yes Text Any value 1

Note that the Name is case-sensitive.

  • Click on Enter Data:

clipboard_ed192ad476d6e5028079012055c37f74f.png

  • Enter an appropriate name (e.g. ViewRecords)
  • Select ViewRecords from the Queries list and click on Advanced Editor:

clipboard_ecc9b6cbdd13941595cdc2950144b953d.png

  • Remove any existing text and replace it with:

let Source = Excel.Workbook(Web.Contents(#"SiteUrl" & "C7IMS/api/businessunits/" & #"BusinessUnitID" & "/viewGroups/" & #"ViewGroupId" &"/views/" & #"ViewId" & "/exportContent?filterXml=&token="), null, true), records = Source{[Item="Table1",Kind="Table"]}[Data], 
    #"Changed Type" = records
in #"Changed Type"

  • Click on Done
  • The records from the IMS view will be listed in the ViewRecords table:

clipboard_ee4f93bd649d57e74d286d297ba405f32.png

  • Click on Close & Apply:

clipboard_ed2b46bc4579ca51426aec9ed2eb34e8b.png

You can now start to build visuals with the data based on your requirements:

clipboard_e2cc8f746d67c103bfb2cafd369ff74f0.png

 

Note: here is an example Power BI report for reference:

Example IMS View Report.pbix

Note: the Power BI report can be copied and updated for each different view that you want to pull data from.


 

 

  • Was this article helpful?