cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HamidBee
Skilled Sharer
Skilled Sharer

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
Skilled Sharer
Skilled Sharer

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
Skilled Sharer
Skilled Sharer

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
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,919)