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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Refresh a dataset not ...
Power Automate
Answered

Refresh a dataset not waiting until refresh completes in Powerbi Services

(0) ShareShare
ReportReport
Posted on by

Hi i using the flow to refresh the power bi dataset via Refresh a dataset option in power automate every thing ok the API is triggering the dataset in power bi services but in flow it is coming to next step even the refresh in progress in power bi services the Refresh a dataset option is not waiting until the refresh completes in power bi services So, Kindly suggest the solution for this.

 

mohindar_0-1652426092986.png

The above is the flow i m using.

 

Categories:
I have the same question (0)
  • Wilky333 Profile Picture
    2 on at

    I'm also experiencing this issue, would be keen to understand why

  • Verified answer
    srduval Profile Picture
    1,760 Moderator on at

    Personally, I think it's a bug in the way they wrote the API as a "user friendly" version. At least they didn't think through a more complete use case scenario about how it would be used. The actual Power BI API that triggers the refresh is a two-part solution one API call triggers the refresh, but then you have to follow behind it with a get refresh status API that takes the refresh ID of the step before and checks to see the status of the refresh. They only made the trigger available, not the check status.

     

    With what we have to work with today, I think the easiest solution (aside from getting a custom connector setup to run your own API commands) would be to look at the refresh history of the dataset, and see how long it takes to refresh, then using a delay action in power automate take the refresh duration and add 30s to a minute more to it and have power automate "wait" that long after triggering a refresh before moving on to the next steps. 

     

    you can vote for or submit this "idea"... should really be a bug report but... on ideas.powerautomate.com 

     

    @Wilky333 @mohindar 

  • Mklinkby Profile Picture
    20 on at

    I have a good solution to this problem, hence I have solved it, it is possible to utilise power automate features and wait until the power bi has refreshed, if you are still interested?

  • ElChech_85 Profile Picture
    7 on at
    Yes, please share with us!!! I'm interested!!!
  • Verified answer
    Mklinkby Profile Picture
    20 on at

    Okay so I will try to make this as short as possible to keep it simple.

    • I utilise a measure/table in my Power BI dataset which sets the refresh time when the dataset has been updated. This is in UTC.
    1. Then in Power Automate I have two variables with refresh times. One which I fix just before refreshing the dataset (utcnow()). The other one is taking the PBIx refresh time.
    2. Refresh my dataset
    3. I have a do until block with the condition that the fixed refresh time has to be less than the PBIx refresh time
    4. I have a delay of 1 min you can customise this to fit the needs
    5. There is a run query against dataset, this is to get the refresh time of the PBIx
    6. And then the last block sets the variable that has the PBIx refresh time

    And then you can have the rest of the flow e.g. sends out an email with the report. You can also include a third variable to make sure that the PBIx was refreshed as there is usually a limit to the amount of cycles. 

     

    Hope it helps, otherwise I am sure the superuser in this forum can follow the logic presented and provide you with further instructions. But I have create several flows with this and it works really well.

     

    Mklinkby_0-1702653444969.png

     

  • srduval Profile Picture
    1,760 Moderator on at

    clever solution not requiring any additional API programming. I haven't tested it yet, but there appear to be some new/updated HTTP actions that pre-authenticate you with an azure token, if that works to run power bi apis without a custom connector, there is an API call that will get you refresh status, then you can loop until the refresh completes and get the status and I think error message should the refresh fail.

     

  • ElChech_85 Profile Picture
    7 on at

    Thank you so much!!! Great solution 😉

  • DamoC Profile Picture
    34 on at

    Hi Mklinkby,
    I am trying your solution to monitoring dataset refreshes, and 
    I have a couple of questions regarding your solution.

    DamoC_0-1703632861054.png

    What is the output used in the above step SetRefreshTime?
    Are the variables RefreshTime and RefreshStartTime integers type ?
    Damian

     

  • Mklinkby Profile Picture
    20 on at

    The variables RefreshTime and RefreshStartTime are set as strings (this works, you might also be able to set them as integers, not sure) and I set a dummy value initially I just use 0. 

     

    RefreshStartTime = utc()

    RefreshTime = outputs('PBIIFS')['body']['results'][0]['tables'][0]['rows'][0]['TimeRefresh[DateTime]']
    For the refresh time you need to extract your date time value from the PBIX

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 251 Super User 2026 Season 1

#2
Haque Profile Picture

Haque 239

#3
Expiscornovus Profile Picture

Expiscornovus 220 Most Valuable Professional

Last 30 days Overall leaderboard