ControlUp recently introduced a powerful Grafana dashboard known as the Big Screen Dashboard, offering a comprehensive view of your IT environment. But what if your organization also leverages Power BI for broader data sharing with business stakeholders and management?
This blog post will guide you through the process of translating a key Grafana widget into Power BI, enabling you to bridge the gap between operational IT metrics and critical business insights. We’ll use a concrete example: transforming a Grafana widget showing average CPU usage trends over time into a dynamic Power BI visualization.
Here’s what you’ll gain by understanding this translation process:
Our Example Widget: “Desktops: Avg. CPU Usages over Time (Only Machines with Sessions)”
Integrating your IT operational data with business intelligence tools like Power BI offers significant advantages:
Fun fact: Did you know you can use AI tools like ChatGPT to significantly assist with these translations, making the process even more efficient?
Let’s begin by examining how the Grafana widget retrieves its data.
https://api.controlup.com/edge/api/dal/device_status
endpoint.To dive deeper into DAL queries and their setup, consult our comprehensive documentation: https://api.controlup.io/reference/get-scoped-data-index. Utilizing the DAL API is highly recommended when creating dashboards for ControlUp for Desktops.
${}
Parameters in Power BIGrafana queries often employ template variables within their JSON structures to enable dynamic filtering and time ranges:
${devicegroups}
→ Your selected device group(s)${tags}
→ Your selected tag(s)${__from:date}
and ${__to:date}
→ The time range currently selected in the dashboard${__interval}
→ The bucket size for data aggregation (e.g., 1m for 1 minute, 1h for 1 hour)For this simplified example, we’re using a static date range and no device filter. However, for dynamic Power BI reports, you can manage these parameters effectively:
start date
and end date
parameters within Power Query.'gte'
and 'lte'
values in your M code body with these Power Query parameter values.This approach allows you to build flexible, parameter-driven Power BI reports that mirror Grafana’s templating capabilities.
The JSON structure from Grafana is typically organized into three primary sections:
${__from:date}
to ${__to:date}
– These Grafana parameters will be replaced with either Power BI parameters or fixed timestamps.active sessions > 0
).cpuload
data is present.The result is a time series representing the average CPU usage for active desktops.
In Grafana, the full JSON body often includes both device_query
and data_query
sections. For this Power BI example, we’ll streamline the process by focusing solely on the data_query
. This provides a clearer and more manageable demonstration of data retrieval in Power BI.
Basic JSON Body (for this blog’s Power BI example — no device_query
):
{ "meta": { "source": "PowerBI" }, "data_query": { "size": 0, "query": { "bool": { "must": [ { "range": { "_created_local": { "gte": "2025-06-09T00:00:00Z", "lte": "2025-06-10T10:00:00Z" } } }, { "exists": { "field": "cpuload" } }, { "range": { "active sessions": { "gt": 0 } } } ] } }, "aggs": { "cpu_usage_over_time": { "date_histogram": { "field": "_created_local", "fixed_interval": "1h", "time_zone": "UTC" }, "aggs": { "average_cpu_usage": { "avg": { "field": "cpuload" } } } } } } }
Now, let’s bring this data into Power BI Desktop:
Get Data
→ Blank Query
.Advanced Editor
from the Home tab.
let url = "https://api.controlup.com/edge/api/dal/device_status", body = Text.Combine({ "{", " ""meta"": { ""source"": ""PowerBI"" },", " ""data_query"": {", " ""size"": 0,", " ""query"": {", " ""bool"": {", " ""must"": [", " { ""range"": { ""_created_local"": { ""gte"": ""2025-06-09T00:00:00Z"", ""lte"": ""2025-06-10T10:00:00Z"" } } },", " { ""exists"": { ""field"": ""cpuload"" } },", " { ""range"": { ""active sessions"": { ""gt"": 0 } } }", " ]", " }", " },", " ""aggs"": {", " ""cpu_usage_over_time"": {", " ""date_histogram"": {", " ""field"": ""_created_local"",", " ""fixed_interval"": ""1h"",", " ""time_zone"": ""UTC""", " },", " ""aggs"": {", " ""average_cpu_usage"": { ""avg"": { ""field"": ""cpuload"" } }", " }", " }", " }", " }", "}" }, "#(lf)"), Source = Json.Document(Web.Contents(url, [ Content = Text.ToBinary(body), Headers = [ #"Content-Type" = "application/json", #"Authorization" = "Bearer YOUR_API_KEY" // REMEMBER TO REPLACE THIS! ] ] )), aggregations = Source[aggregations], cpu_usage_over_time = aggregations[cpu_usage_over_time], buckets = cpu_usage_over_time[buckets], #"Converted to Table" = Table.FromList(buckets, Splitter.SplitByNothing(), null, null, ExtraValues.Error), #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"key_as_string", "key", "doc_count", "average_cpu_usage"}, {"Column1.key_as_string", "Column1.key", "Column1.doc_count", "Column1.average_cpu_usage"}), #"Expanded Column1.average_cpu_usage" = Table.ExpandRecordColumn(#"Expanded Column1", "Column1.average_cpu_usage", {"value"}, {"Column1.average_cpu_usage.value"}) in #"Expanded Column1.average_cpu_usage"
Important: Replace YOUR_API_KEY
with your actual API key.
Notice that we’ve used a fixed time interval along with specific start and end dates in this example. For production environments, you’ll likely want to replace these static values with Power BI parameters for dynamic date range selection.
From here, you have the flexibility to visualize your data within Power BI in any way you prefer. The Grafana widget uses a Time Series chart; you can easily replicate this in Power BI using a Line chart, and then further enhance it with Power BI’s extensive formatting and interactive capabilities.
Tools like ChatGPT can be incredibly valuable in accelerating the translation of Grafana dashboards to Power BI. Here are some key benefits of integrating AI into your workflow:
A Recommended AI-Assisted Workflow:
average_cpu_usage
and key_as_string
for a time series chart.”By following this method, you can efficiently translate valuable IT operational widgets from your ControlUp Grafana dashboards (including the Big Screen Dashboard) into comprehensive and shareable Power BI reports. This empowers your organization with deeper, unified insights, bridging the gap between IT performance and business outcomes.