Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
Hi,
I am using the follwoing power shell script to create and stream some data (timestamp, value, minimum, maximum, target). The timestamp is the current time, value is a random value, and minimim/maximum/target are predefined values.
However, my dashboard updates only if I switch tabs and not "live". Any ideas what the problem is?
$endpoint = "https://api.powerbi.com/beta/xxxxxxxxxxxxxxxxxxxx/datasets/xxxxxxxxxxxxxxx/rows?key=xxxxxxxxxxxx" $minutes=10 $rate=1 $maxcounter=$minutes*60*(1000/$rate) $minimum=0 $maximum=120 $target=80 Write-Host $minutes Write-Host $rate Write-Host $maxcounter Write-Host $minimum Write-Host $maximum Write-Host $target Function Start-Stream { Write-Host "Start stream..." while($i -lt $maxcounter) { $i++ $value=Get-Random -Minimum $minimum -Maximum $maximum $date=Get-Date $date=$date.GetDateTimeFormats()[105] $payload = @{ "timestamp" =$date "value" =$value "min" =$minimum "max" =$maximum "target" =$target } Start-Sleep -Milliseconds $rate $resp="No error messsage" try { Invoke-RestMethod -Method Post -Uri "$endpoint" -Body (ConvertTo-Json @($payload)) $resp=$payload | Out-String } catch { $resp="Error: "+$_.Exception.Response.GetResponseStream() } Write-Host $resp Write-Host $i " from " $maxcounter } Write-Host "Streamming finished" Write-Host "maxcounter count: "+$i } Start-Stream
Hi @Anonymous,
Based on test, streaming dataset works on my side. Can you ensure you have following below document to build the streaming tiles?
Real-time streaming in Power BI
Regards,
Xiaoxin Sheng
Now it works for me again. Maybe there was a refresh issue because I was coneted on WiFi the other days? Who knows.
Hi @Anonymous,
Maybe the issue due to your network DNS settings, it may block the httprequest.
Please do mask sensitive data before sharing your data.
Regards,
Xiaoxin Sheng
That was only mock data 🙂 Thanks for the hint though!