Skip to main content
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Helper II
Helper II

Real Time data from local measuring device



we have measuring controller, which has integrated web portal to access real-time measures.

We access web page by the link

Inside of html I see folowing code



<script type="text/javascript">
function loadXMLDoc() {
var xmlhttp = new XMLHttpRequest();

xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200) {
}"GET", "IOCounter.htm", true);

function myFunction(response) {

var result;
result = response.split(";");
document.getElementById ("id01").style.backgroundColor = result[1];
document.getElementById ("id01").innerHTML = result[0] + " f/h";

setInterval(loadXMLDoc, 1000);


I can add it PowerBI desktop as a Web source and manually I can refresh measured value, but

how can I push this data from controller to PowerBi service ?

Community Support
Community Support

HI @mrslyfox,

AFAIK, power bi not load/run javascript functions when you use web connector, it will get html elements and stored as text format.


In addition, you can also take a look at following link:

Call custom Javascript function in a table column



Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

Hello @v-shex-msft


Here is My test powershell script to push data to PBI service


$endpoint = ""

$payload = @{

"Measured" =Get-Random -Minimum 10 -Maximum 100

"DateTime" =Get-Date -Format F
"MachineName" ="Ford"
"TargetValue" =80
"MinValue" =10
"MaxValue" =100

Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo-Json @($payload))


and with second Script, which can get counter result from Measuring device


$WebResponse = Invoke-WebRequest ""



Two problem I have (for the lack of scripting knowledges) 

1. I have no idea how to put result from second script into the 'Measured" = 

2. result from second script return value with char " ; ", like: 25000;

and I need to delete it.

Helpful resources

Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City


Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors