Forum Discussion
Real Time data from local measuring device
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
Regards,
Xiaoxin Sheng
Hello Anonymous
Here is My test powershell script to push data to PBI service
while($true){
$endpoint = "https://api.powerbi.com/xxxxxxxxxx"
$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 "http://10.20.30.1/awp/Ford/IOCounter.htm"
$WebResponse.Content
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.