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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Anonymous
Not applicable

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
v-shex-msft
Community Support
Community Support

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

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

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

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

That was only mock data 🙂 Thanks for the hint though!

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

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