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 two different ways:

  1. Flat file import.

  2. Web API Connectivity.

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.