cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
tschris Regular Visitor
Regular Visitor

Dashboard with stream data tile does not update unless browser tab changes

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

 

4 REPLIES 4
Community Support Team
Community Support Team

Re: Dashboard with stream data tile does not update unless browser tab changes

Hi @tschris,

 

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

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



For learning resources/Release notes, please visit: | |
tschris Regular Visitor
Regular Visitor

Re: Dashboard with stream data tile does not update unless browser tab changes

Now it works for me again. Maybe there was a refresh issue because I was coneted on WiFi the other days? Who knows.

Community Support Team
Community Support Team

Re: Dashboard with stream data tile does not update unless browser tab changes

Hi @tschris,

 

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

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



For learning resources/Release notes, please visit: | |
tschris Regular Visitor
Regular Visitor

Re: Dashboard with stream data tile does not update unless browser tab changes

That was only mock data Smiley Happy Thanks for the hint though!