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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
abhiram342
Microsoft Employee
Microsoft Employee

Power Apps integration in power bi -PowerBIIntegration.Refresh() is inconsistent in Direct Lake Mode

Hi Team - I have a Power BI dashboard that allows users to edit specific fields within a table chart. To enable this functionality, I implemented a Power Apps solution and integrated it into Power BI. However, the PowerBIIntegration.Refresh() function does not consistently refresh the visuals in the report. Sometimes it works as expected, but other times it does not.

Implementation
1) Fabric SQL Database: Contains the table with the columns to be edited.
2) Fabric Lakehouse (SQL Analytics Endpoint):
    2.1) A data model was created using the Lakehouse SQL Analytics Endpoint.
    2.2) A shortcut was created to the Fabric SQL Database.
        2.3) The shortcut table was included in the data model.
        Note: Changes made in the Fabric SQL Database take 25–30 seconds to reflect in the shortcut.
 
Edit Form Code:
SubmitForm(EditForm1);PowerBIIntegration.Refresh();

Flow:
A row is selected in the table chart.
Corresponding data is displayed in Power Apps (using a Power Apps Form and Azure SQL as source).
2.1 Row is selected in tabled chart and Fields are edited in Power Apps.
2.2 Save button is clicked.
2.3 Power BI refresh visual is triggered
    Issue: This refresh is inconsistent—it sometimes works, but other times it does not.
 
Can you please suggest if there are any workarounds?

Thanks,
Abhiram
2 ACCEPTED SOLUTIONS

I don't think Direct Lake mode will get you a deterministic UX. There are random delays in the process. I would go with Direct Query to the database, not the endpoint.

View solution in original post

v-veshwara-msft
Community Support
Community Support

Hi @abhiram342 ,
Thanks for posting in Microsoft Fabric Community.
Thanks for providing all the details. From what you're describing, it seems like the issue with PowerBIIntegration.Refresh() is due to how the data is being updated in Direct Lake Mode.
As mentioned by @lbendlin , since there can be random delays in propagating changes from the Fabric SQL Database to the Lakehouse, the Power BI visuals may not refresh consistently.

Possible Workaround:
You could try adding a small delay before using PowerBIIntegration.Refresh(). This gives the system extra time to make sure all changes are fully synced, making the refresh process smoother.


As @lbendlin  mentioned, Direct Lake Mode may not offer a fully deterministic experience. If you're looking for more consistent results, using Direct Query directly to the database instead of the endpoint might provide a more stable connection.

Also, here's a link that discusses a similar scenario and provides some additional insights.

From Microsoft’s documentation:

vveshwaramsft_0-1738512965534.png
Power Apps visual for Power BI - Power Apps | Microsoft Learn

Hope this helps. Please reach out for any assistance.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and a kudos would be appreciated.
Best Regards,
Vinay.

 

 

View solution in original post

4 REPLIES 4
v-veshwara-msft
Community Support
Community Support

Hi @abhiram342 ,
Thanks for posting in Microsoft Fabric Community.
Thanks for providing all the details. From what you're describing, it seems like the issue with PowerBIIntegration.Refresh() is due to how the data is being updated in Direct Lake Mode.
As mentioned by @lbendlin , since there can be random delays in propagating changes from the Fabric SQL Database to the Lakehouse, the Power BI visuals may not refresh consistently.

Possible Workaround:
You could try adding a small delay before using PowerBIIntegration.Refresh(). This gives the system extra time to make sure all changes are fully synced, making the refresh process smoother.


As @lbendlin  mentioned, Direct Lake Mode may not offer a fully deterministic experience. If you're looking for more consistent results, using Direct Query directly to the database instead of the endpoint might provide a more stable connection.

Also, here's a link that discusses a similar scenario and provides some additional insights.

From Microsoft’s documentation:

vveshwaramsft_0-1738512965534.png
Power Apps visual for Power BI - Power Apps | Microsoft Learn

Hope this helps. Please reach out for any assistance.

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly and a kudos would be appreciated.
Best Regards,
Vinay.

 

 

lbendlin
Super User
Super User

Are you connecting to the Fabric SQL database in Direct Query mode?  Why are you connecting via the shortcut rather then directly?

 

You are missing step 2.2.1 - data is patched to the database

Hi @lbendlin - thank you for response! 

 

Are you connecting to the Fabric SQL database in Direct Query mode?  Why are you connecting via the shortcut rather then directly?

>> No, I'm using Direct Lake Mode using shortcut. Our data model is based of Lakehouse sql analytics end point . ( for Edit Feature, I'm using Fabric SQL Database)

     If I include Fabric SQL Database without shortcut, I believe I will lose direct lake mode i..e in order to get benfit from direct lake mode, I should have single source in data model i.e Lakehouse SQL Anlaytics endpoint instead of Lakehouse SQL Anlaytics endpoint and Fabric SQL Database analytics end point.

 

 You are missing step 2.2.1 - data is patched to the database

>> I see the patching happened automatically , I didn't implemented any custom code.

 

Thanks,

Abhiram

 

I don't think Direct Lake mode will get you a deterministic UX. There are random delays in the process. I would go with Direct Query to the database, not the endpoint.

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors