inmation Power BI

Power BI is a business intelligence tool by Microsoft. It aims to provide interactive and easy to use data visualization options, users can create their own reports and dashboards. Main features of Power BI are:

  • Rich Graphical visualization from complex data.

  • Ad-hoc Reporting.

  • Easy to use navigation pane.

inmation users can benefit from the easy connectivity in three different ways:

  1. Flat file import.

  2. Web API Connectivity.

  3. Custom inmation connectors.

Power BI Installation

In this section, you will find instructions for installing Power BI Desktop version.

Power BI Desktop application is only available for Windows operating system. In order to use Power BI Linux and Mac operating systems you will need a Pro version. To install Power BI Desktop version:

  1. Go to

  2. Click on DOWNLOAD FREE.

  3. You will be redirected to Microsoft Store, click on Get and download will start.

  4. After download is complete, Launch the application.

  5. Create a new Power BI account or Sign in with the existing account and you are all set up.

Data Import

Below a few examples of importing data from inmation are provided. The examples will be based on inmation demo data set, to configure the demo data, follow this guide.

1. Flat file import

  1. DataStudio allows file export, right click on the selected object and choose add item(s) to History Grid. Select the desired period and History grid will be displayed on your screen.

  2. On the top left corner of the history grid, export button can be found (fourth button from the left), DataStudio supports CSV, Excel and JSON format export. Power BI supports all of these formats, however CSV is easiest to work with, since CSV is directly recognized and translated into Power BI data table. After choosing export format the file will automatically open, go to file save as to save the file on your chosen location on the system.

  3. Open Power BI Desktop application, click on the New Source tile, which is located in the menu bar on the left side of the screen. Click on more → File → CSV → Connect → choose the CSV file → click Open.

  4. You are ready to work with your data.

2. Connectivity through Web API

Postman or Swagger and inmation Web API can be used to generate URL, which in turn can be used to import data from inmation DataStudio to Power BI Desktop. Note that only GET method can be used to fetch the data using Power BI Web method.

  1. Open Power BI Desktop application, click on the New Source tile, which is located in the menu bar on the left side of the screen. Click on more → Other → Web → Connect.

  2. Paste URL and click OK.

  3. To expend your data into a Power BI data table, choose Into Table from the menu bar.

  4. Click on the expand button and choose Expand to New Rows.

  5. Repeat action, and choose which values should be included in the table.

  6. After data has been fully expanded into a table, save the data table by clicking on Close & Apply.

  7. Now you can work with your data which is in the Data tab.

For more information about available inmation Web API endpoints and how to use them read here.

Advanced Endpoint

Advanced Endpoints is a very powerful way to embed your corporate logic directly in the inmation Web API. Advanced Endpoint can be used for data export and Content-Type setting, for example to CSV instead of the usual JSON.

To create advanced endpoint for reading historical data go to DataStudio, select APIContext and click on Script Library which is located in the Object Properties tab on the right side of the screen. Add a new Script library by pressing the plus sign and name the library "my-lib". This simplified script example reads raw historical data of the process data item from the DemoData. Add this script to Lua Script Body section:

local inAPI = require('inmation.api')

local lib = {}

function lib.readhist(_, arg, req, hlp)
    arg = arg or {}
    local now = inmation.currenttime()
    local startTime
    if type(arg.starttime) == 'string' then
        -- Use starttime supplied by the caller
        startTime = arg.starttime
        -- Fallback to a default relative starttime
        startTime = inmation.gettime(now-(5*60*1000))
    local endTime = inmation.gettime(now)
    local qry = {
        start_time = startTime,
        end_time = endTime,
        items = {
                p = "/System/Core/Examples/Demo Data/Process Data/DC4711"

    local respData = {}
    local res = inAPI:readrawhistoricaldata(qry, req, hlp)
    local rawData = or {}
    local histData = rawData.historical_data or {}
    local queryData = histData.query_data or {}
    if #queryData > 0 then
        queryData = queryData[1]
        local items = queryData.items or {}
        if #items > 0 then
            items = items[1]
            for i,t in ipairs(items.t) do
                local value = items.v[i]
                local timestampISO = inmation.gettime(t)
                local row = ("%s,%s"):format(timestampISO, value)
                table.insert(respData, row)
    local result = table.concat(respData, '\n')
    return hlp:createResponse(result, nil, 200, { ["Content-Type"] = "text/csv" })

return lib
  • HTTP Method Get


Invoke the Lua script from Postman tool to test if everything is working. If your test was successful, go to your Power BI Desktop, choose Get Data → Web, paste your URL → click ok. After successful import preview tab should pop up, with your data transformed into a Power BI data table.

  • Response body


For more information about Advanced Endpoints visit Web API Advanced Endpoint.

3. inmation connector

Third data import option is through one of inmation’s Power BI connector: 1. Read Historical data connector, 2. Execute Function connector.

inmation Connector Installation

First, download and install the connector:

  1. In This PC / Documents directory create a folder Power BI Desktop inside create another new folder and name it Custom Connectors.

  2. Download the connector file(s).

  3. Place the file into the Documents/Power BI/Custom Connectors folder.

To avoid a warning about connection to the third-party services, you will need to enable loading uncertified connectors:

  1. Open Power BI Desktop.

  2. Go to File | Options and settings | Options.

  3. Go the Security tab.

  4. Under Data Extensions, select Allow any extension to load without warning or validation.

  5. Restart Power BI Desktop.

Open a new Power BI file, go to the options and settings, in the Preview features tab enable Custom data connectors by selecting it. This feature allows the data structure preview when loading the data.

Open Get Data and search for inmation connectors. Pick one of the following connectors:

  1. inmation - Read Historical Data connector. Returns specified object’s processed historical data. Click here to download the inmationReadHistoricalData.mez file.

  2. inmation - Execute Function connector. Fetches data by using the inmation Web API ExecuteFunction endpoint. Click here to download the inmationExecFunction.mez file.


Depending on which connector you are going to use, you will see one of the following argument tables in the first display screen. Below tables contain explanation of each argument.

inmation - Read Historical Data

Name Description

Web API base URL

The base address of the inmation Web API.

Start Time

The start time (UTC) of the interval to retrieve data for.

End Time

The end time (UTC) of the interval to retrieve data for.


Comma separated paths of the object to be queried for historical data.


The aggregate type as string code. E.g. Average.

inmation - Execute Function

Name Description

Web API base URL

The base address of the inmation Web API.


Name of the script library which contains or returns the function to execute.

Function (optional)

Name of the function to execute. Required in case the library itself does not return a function.

Context (optional)

A path, which specifies the context in which the provided function has to be executed. By default, the context path of the inmation Web API server object.

Second display screen is a login screen containing your inmation username and password input fields. After successful connection data should be imported into Power BI application, now you are ready to work with your data.