cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HamidBee
Post Patron
Post Patron

Why does my Power BI dataset in my PowerBI workspace not refresh when I use PowerBI.RefreshDataset?

Hi All, 

 

  1. Firstly I created a report in Power BI using a SharePoint List. I then saved the report onto OneDrive and uploaded it onto my Power BI workspace. I pinned one of the tables onto a dashboard.
  2. I then created a canvas app in Power Apps, added the same SharePoint List as a datasource and created a very basic form.
  3. I then embedded the Power BI chart onto the dashboard.
  4. From here, I followed the following tutorial to get my Power BI dataset to refresh as soon as a CRUD input is made. Here is a summary:

On the 'submit button' I put the following 'OnSelect':

 

 

SubmitForm(Form2);
Set(Refreshvar,true);
PowerBI.RefreshDataset("workspacename","datasetid");
Set(Refreshvar,false);

 

 

Just a note, under workspacename I used my actually workspace name and for datasetid I used the actual dataset ID in my workspace.

 

Then I clicked on the Power BI visual and under 'Reset' I typed the following:

 

 

If(Refreshvar=true,false,true)

 

 

The strange thing is that after the form is submitted, the SharePoint list updates, the chart refreshes but the Power BI dataset does not update to reflect any changes. Does anyone know why this is?.

 

Thanks in advance. 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
HamidBee
Post Patron
Post Patron

I've discovered that a SharePoint List dataset does not need refreshing as it would refresh on its own once a change is detected. It just takes a long time This may have also been the cause of the error.

View solution in original post

3 REPLIES 3
BCBuizer
Super User
Super User

Hi @HamidBee ,

 

Perhaps this topic is of help to you: https://powerusers.microsoft.com/t5/Building-Power-Apps/quot-PowerBI-RefreshDataset-quot-in-the-OnSe...



Did you like my post? Please give it a thumbs up! Did I resolve your issue? Please click Accept as Solution to close the topic and so other members of the community can find solutions more easily.

Using Power Automate is an option but firstly I'd like to explore how I could achieve a data refresh by using PowerBI.RefreshDataset. Thanks for sharing though.

HamidBee
Post Patron
Post Patron

I've discovered that a SharePoint List dataset does not need refreshing as it would refresh on its own once a change is detected. It just takes a long time This may have also been the cause of the error.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Check out the New Ideas Site

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,907)