Connect Power BI to Nexalis Cloud’s real-time API to build interactive dashboards. This guide provides two tutorials: first, how to query your tags list, and second, how to fetch time-series data.Documentation Index
Fetch the complete documentation index at: https://docs.nexalis.io/llms.txt
Use this file to discover all available pages before exploring further.
Tutorial 1: Getting the Nexalis Tags List
This tutorial shows how to retrieve all available data points from your Nexalis Cloud instance, including labels and attributes like siteName, deviceID, dataObject, assetType, etc.Step 1: Create a Blank Report
- Open Power BI Desktop
- Click Home → Get Data → Blank Query
Step 2: Create Parameters
- Go to Home → Manage Parameters → New Parameter
- Create the following parameters:
- Name:
NexalisApiBaseUrl - Type: Text
- Current Value:
https://yourcompany.app.nexalis.io/api/v0
- Name:
NexalisApiReadToken - Type: Text
- Current Value:
YOUR_READ_TOKEN
Step 3: Create the Tags List Query
- Create a new blank query
- Go to Home → Advanced Editor
- Paste the following code:
- Click Done
- You can rename this function “fnNexalisTagsList”
Step 4: Create the connection
- Click Invoke, which will prompt the warning message “Please specify how to connect”.
- Click Edit Credentials
- In the “Anonymous” connection method, scroll through the urls list to select “https://yourcompany.app.nexalis.io/api/v0/find”
- Then click Connect
Step 5: Load the Data
Click Close & Apply to load the tags list table into Power BI.What You Get
Your NexalisTagsList table contains all available tags with their properties:| Column | Description |
|---|---|
siteName | Site identifier |
deviceModel | Device model name |
deviceID | Unique device identifier |
dataPoint | Raw data point identifier |
description | Human-readable description |
assetType | Asset type (INV, METER, etc.) |
dataObject | Standardized data object name |
subDataObject | Sub-object for complex measurements |
logicalNode | IEC 61850 logical node |
measurementType | Analog or Discrete |
engUnits | Engineering units (kW, kWh, V, etc.) |
multiplier | Scaling multiplier for unit conversion |
adder | Scaling offset for unit conversion |
protocol | Communication protocol used |
subDeviceID | Sub-device identifier if applicable |
nx-agent-id | Nexalis agent version |
Why Start with Tags List?
Start with Tags List First: It’s more efficient to query and explore the list of available tags (FIND) before fetching time-series values (FETCH). FIND queries are lightweight and fast, while FETCH returns actual time-series data which can take significantly longer for large time windows. Parameter-Based Configuration: Parametrizing the URL and token allows you to:- Reuse across functions: Reference the same parameters in multiple queries without duplicating configuration
- Share safely: Share Power BI functions with colleagues without exposing your personal READ token
Tutorial 2: Fetching Time-Series Data (Advanced)
This tutorial shows how to create a function that fetches actual time-series values using the@nexalis/fetch_trapezoidal_averages macro.
It assumes that you already completed Tutorial 1 and have the NexalisApiBaseUrl and NexalisApiReadToken parameters configured with the API connection established.
Step 1: Create the Fetch Trapezoidal Function
- Create a new blank query
- Go to Home → Advanced Editor
- Paste the following code:
- Click Done
Step 2: Rename the Function
- Rename the query to
fnFetchTrapezoidalAverages
Step 3: Test the Function
- Create a new blank query
- Go to Home → Advanced Editor
- Option A: Paste the following example code to use ISO8601 dates: (Note the single quotes encapsulated in double quotes. You’re passing string objects).
- Option B: If you want “start” and “end” to use unix microsecods timestamps: (Note the absence of single quotes. You’re passing LONG objects).
- Option C: If you want to use rolling time windows: (Note the absence of single quotes. The function NOW returns the current unix timestamp)
- Click Done
Step 4: Create the connection
- Click Edit Credentials
- In the “Anonymous” connection method, scroll through the urls list to select “https://yourcompany.app.nexalis.io/api/v0/exec”
- Then click Connect
Start, End, BucketSize, Labels) to query different time ranges and data points.
💡 Tip: You can use filters and regular expressions in the Labels parameter to query multiple data points at once. See Filtering Data for pattern matching examples.
Step 5: Rename the Query and Save
- We recommend renaming the query to describe the data (e.g. TurbinesActivePowerAverages)
- Click Close & Apply in the top-left corner
What You Get
The function returns a table with time-series data aggregated into buckets:| Column | Description |
|---|---|
dtConnector | Timestamp for the bucket (datetimezone) |
siteName | Site identifier |
deviceModel | Device model name |
deviceID | Unique device identifier |
dataPoint | Raw data point identifier |
value | Time-weighted average value for the bucket |
description | Human-readable description |
subDeviceID | Sub-device identifier if applicable |
assetType | Asset type (INV, METER, etc.) |
logicalNode | IEC 61850 logical node |
dataObject | Standardized data object name |
subDataObject | Sub-object for complex measurements |
measurementType | Analog or Discrete |
engUnits | Engineering units (kW, kWh, V, etc.) |
multiplier | Scaling multiplier for unit conversion |
adder | Scaling offset for unit conversion |
Null values: If all values in the result are
null, this means the queried time range has no data points and no anterior data points for trapezoidal interpolation. Try expanding your time range or verifying the data point exists in that period.Best Practices
Next Steps
- Review Warp10 macro examples for more query patterns
- Learn about Python integration for data pipelines
- Check the complete API reference for advanced features