Forum Discussion
PowerBI Report and Dashboard not Updating when Database Updated - HELP!
- 1 year ago
Hi JamesJenkins - This issue often arises because Power BI tiles embedded in Power Apps do not automatically update in real-time, even when using Direct Query. The key here is that Direct Query ensures that Power BI visuals query the database when refreshed, but embedded tiles in Power Apps require additional setup to refresh dynamically.
1. Enable Real-Time Updates
Power BI does not inherently refresh embedded tiles in real-time. To achieve real-time updates, use Power Automate to trigger a dataset refresh when new data is added.Steps:
Create a Power Automate Flow:Open Power Automate.
Create a new flow triggered by the Dataverse table update (e.g., when a row is added).
Add a Power BI action to refresh the dataset associated with your Power BI report.
Action: "Refresh a dataset".
Select the workspace and dataset.
Test the Flow:Add data to the Dataverse table and verify that the dataset refreshes in Power BI Service.
Embed the Tile in Power Apps:Use the Power BI Tile control in Power Apps to embed the updated tile.
The tile will update when the dataset refreshes.
2. Adjust Dataset Refresh Frequency
If you cannot use Power Automate or prefer a simpler approach:In Power BI Service, adjust the Direct Query refresh frequency:
Go to the workspace containing your Power BI report.
Open the dataset settings.
Increase the Direct Query cache refresh frequency to the shortest interval allowed (usually 1 minute).
Note: Frequent refreshes can impact performance, so use this cautiously.3. Use Power BI Push Datasets (Optional)
For true real-time updates, consider switching to a Push Dataset:A Push Dataset allows you to stream data directly into Power BI, bypassing the need for scheduled refreshes.
Set up a Power Automate flow to push new data from Dataverse into the Push Dataset.
This approach is more complex but provides instantaneous updates.
4. Test Refresh Behavior in Power Apps
Sometimes the Power BI Tile in Power Apps might not reflect changes due to caching or embedding issues.Steps:
Add a manual refresh button in Power Apps to reload the tile:Use the Refresh function for the Power BI Tile control.
Example: Refresh(PowerBIIntegration)
Test the behavior by:Adding data to Dataverse.
Triggering the manual refresh in Power Apps.
5. Use Power BI REST API (Advanced)
For more advanced use cases, you can use the Power BI REST API to programmatically refresh the dataset when new data is added. This requires:Registering an app in Azure AD.
Using the Refresh Dataset API to trigger a dataset refresh. - 1 year ago
Hi JamesJenkins
Hope you are doing well!Thanks for reaching out to the Microsoft Fabric Community Forum
Since already configured a Power Automate flow that updates the dataset in Power BI Service upon the addition of a new row to Dataverse table, this setup is correctly implemented.To refresh the Power BI tile without refreshing the entire page, Here are the below methods that will be useful as per requirements:
1.Add a Button for Manual Refresh
Navigate to insert a button in Power App and set the OnSelect property of the button to Refresh(PowerBI Tile Control Name) replacing PowerBI Tile Control Name with the actual name of Power BI tile control. This will manually refresh the Power BI tile when the button is clicked.
2.Automatic Refresh Using Timer Control
Insert a Timer control into Power App and Set the Duration property to the desired refresh interval (e.g., 60000 for 1 minute).Then set the OnTimerEnd property to Refresh(PowerBI Tile Control Name) . Additionally, set the AutoStart property to true and Repeat property to true.3. Modify the Tile URL
Create a variable to store the tile URL after that set the tile URL to blank and then back to the actual URL using the Set function.
Set Function
Set(TileURL, " ");
Set(TileURL, "ActualTileURL");
Use this logic in the OnSelect property of a button or in the OnTimerEnd property of a Timer control.
Here is the example code for Timer Control// Insert a Timer control
Timer1.OnTimerEnd = Set(TileURL, ""); Set(TileURL, "ActualTileURL");
Timer1.Duration = 60000; // 1 minute
Timer1.AutoStart = true;
Timer1.Repeat = true;
4. Finally test the above one of the methods by adding data to Dataverse table. Verify that the dataset refreshes in Power BI Service.Check if the Power BI tile in Power App updates automatically or when the refresh button is clicked.By following these steps, should be able to achieve near real-time updates for your Power BI tile within Power App.
If you have any further questions or need additional help with this, feel free to reach out to us for further assistance!
If you find this post helpful, please mark it as an "Accept as Solution" and give a KUDOS.
Hello,
Thank you for your help with this, it is really appreciated.
What I have done, is add in a Timer control and set the on finish to set the URL variable to " ", then the actual.
I put the OnSelect property of the button that submits the data in the first instant to start the timer. The time for my PowerAutomate flow to update my dataset can reach up to 2 seconds in some cases. I set the timer to 3 seconds, and then made the timer reset after it has finished.
This is working and it is refreshing the tile, but the data that comes up is still a little bit older than what I had just inputted. For example, I just deleted some data and tried refreshing but nothing happened, I then added some and refreshed a couple minutes later using the timer, and it only reflected the changes to the data when I deleted the records.
Any tips to make this real time?
Thanks