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.
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!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.