Forum Discussion

TJohnsonOK's avatar
TJohnsonOK
Icon for Helper I rankHelper I
1 year ago
Solved

Refresh a query with an API only one time a day through automated refresh schedule.

HI.  

I have a power bi report that has a weather API.  I currently have an auto refresh one time every day.  However, when I am working in the desktop and need to publish the dataset due to something changing (not associated with the API), evertything refreshes--including the API.  I am charged every time the API runs.  Is there a way that I can make the queries in Power Query only refresh 1 time a day through the automated refresh, not everytime I happen to need to publish the dataset to the service.  Thank you for your help.

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi TJohnsonOK ,

     

    If you haven't used flow before, I made a simple sample for you.

    //Create a SharePoint list as the dataset to save the outputs from calling the API

     

    Best Regards,

    Wearsky

4 Replies

  • No.  You would need to decouple the API call by (for example) running a Power Automate Flow that is scheduled to run once a day, calls the API, and stores the response as JSON in a OneDrive.  Then point your semantic model to that JSON file for refresh.

    • TJohnsonOK's avatar
      TJohnsonOK
      Icon for Helper I rankHelper I

      Thank you for the quick response. I will have to see if I can implement this. 

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi TJohnsonOK ,

     

    If you haven't used flow before, I made a simple sample for you.

    //Create a SharePoint list as the dataset to save the outputs from calling the API

     

    Best Regards,

    Wearsky

    • TJohnsonOK's avatar
      TJohnsonOK
      Icon for Helper I rankHelper I

      Thank you so much!  I will check it out!  It may be next week before I am able to do so.  I really appreciate your help!