web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerBI.RefreshDataset...
Power Apps
Unanswered

PowerBI.RefreshDataset() does not work

(0) ShareShare
ReportReport
Posted on by 144

Hi friends, 

 

I am building my very first app which allows PowerBI user able to add/correct data directly on Power BI service by using Power Apps visual provided in Power Bi. 

 

In my case, my source data are the excel file which is hosted on Sharepoint. I was correcting the wrong reject reason from W3 to W3333. After I submitted the form, I checked my original data on the excel file, it updated. However, it did not refresh the visual on Power BI. It still kept W3. 

 

tracytran_1-1636343096544.png

 

I tried using PowerBIIntegration.Refresh() and PowerBI.RefreshDataset() but there was no luck. 

 

tracytran_0-1636342615815.png

 

Could anyone please help me regarding this issue? 

 

Thank you for your support. 

Categories:
I have the same question (0)
  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @tracytran 

     

    Power BI is connected to excel but through a refresh cycle. PowerBIIntegration.Refresh() will refresh the data but from cached data. There is no way to make automated updates when the data source is excel. Power BI Refresh based on your refresh cycle when the data source is not supporting a direct query.

     

    The only option is to use Direct Query when building Power BI Report. Here is the MS article for supported data sources for direct queries.

     

    Thanks,
    Stalin - Learn To Illuminate

     

  • tracytran Profile Picture
    144 on at

    @StalinPonnusamy I got your point. Thats why I tried using PowerBI.RefreshDataset() to refresh dataset, but does not work. 

     PowerBIIntegration.Refresh() Will work only with Direct Query. 

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @tracytran 

     

    We need to Reset the Power BI control once the data is updated. Set the OnSuccess property of the form to

    Notify("Successful")
    Set(ResetPowerBI, false);
    PowerBI.RefreshDataSet("me","Dataset GUID");
    Set(ResetPowerBI, true);Set(ResetPowerBI, false);

     

    And Set the Reset property of Power BI Control to

    ResetPowerBI

     

    Daniel has a video that discusses specifically this issue. Watch from 11:30 on this video. 

     

    I hope this resolves the issue.


    Thanks,
    Stalin - Learn To Illuminate

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @tracytran 

     

    I have updated the above post for the steps to refresh.


    Thanks,
    Stalin - Learn To Illuminate

  • tracytran Profile Picture
    144 on at

    @StalinPonnusamy Thank for your suggestion. 

     

    I gave it a try. However, it was the same, not working. It refreshed dataset, not the visual. 

     

    tracytran_0-1636769416823.png

    My case is  a little bit different with Daniel. I integrate Power Apps into Power BI and he integrates Power BI into Power Apps. Therefore, there is no Power BI Control to refresh the property.

     

    I am thinking using Automate in Power Apps to refresh it. I created a flow to refresh Power BI, however, I am new with Power App, I do not know how to trigger a flow in Power App form. Do you have any idea about it?

     

  • tracytran Profile Picture
    144 on at

    @StalinPonnusamy Thank for your suggestion. 

     

    I gave it a try. However, it was the same, not working. It refreshed dataset, not the visual. 

    tracytran_0-1636769416823.png

    My case is  a little bit different with Daniel. I integrate Power Apps into Power BI and he integrates Power BI into Power Apps. Therefore, there is no Power BI Control to refresh the property.

    I am thinking using Flow in Power Apps to refresh it. However, I am now with Power App. You have any idea about it?

     

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @tracytran 

     

    Then will try to reset Power Bi Dataset using Power Automate.

     

    • Create new Power automate
    • Select Trigger: PowerApps (Like below)

    StalinPonnusamy_0-1636770502408.png

     

    Flow Steps/Actions:  (My flow Name : ResetPowerBIDataset)

    StalinPonnusamy_1-1636770627636.png

     

    Call the flow from PowerApps Once the form is submitted successfully

     

    Notify("Successful")
    ResetPowerBIDataset.Run()

     

     


    Thanks,
    Stalin - Learn To Illuminate

     

  • tracytran Profile Picture
    144 on at

    @StalinPonnusamy thank for your prompt reply. 

     

    I created the flow as your suggestion: 

     

    tracytran_0-1636773952870.png

     

    Call the flow from PowerApps Once the form is submitted successfully. However, it raised the error. 

    tracytran_2-1636774828326.png

     

    I tried the second time with Onsuccess action. It also raised the error. 

    tracytran_3-1636774952611.png

     

    Do you have any idea where I am missing? @StalinPonnusamy 

  • StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @tracytran 

     

     

    Looks like the Power Automate is not connected to PowerApps. You may need to close the app and reopen it to connect the newly created Power Automate.

     

    • Insert a button
    • Select the button
    • Click Action on the menu bar
    • Click Power Automate
    • Power automate list will display on the right side
    • Select the Power Automate "ResetPowerBIDataset"

    StalinPonnusamy_2-1636776921114.png

     

    Change Power Automate return type to text like below

    StalinPonnusamy_1-1636776875381.png

     

     

     

  • Verified answer
    StalinPonnusamy Profile Picture
    Super User 2024 Season 1 on at

    Hi @tracytran 

     

    Once the above post is completed then remove the button and update the code 

     

    Notify("Successful")
    Set(
     ReturnString,
     ResetPowerBIDataset.Run().returnvaluestring
    );

     

    Insert a label and set the text property to

    ReturnString

     

    This verifies the power automate completed or not

    Note: Return type updated from boolean to string.


    Thanks,
    Stalin - Learn To Illuminate

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard