Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
gaurangross
Regular Visitor

Slicer values not refreshing in import mode

We are using Power BI embedded service with import mode. We use power bi API to publish and refresh dataset. After data refresh through API, slicer still shows old or previous value in dropdown. This is show stopper for us as slicer shows old value which confused user. 

 

Any one has any ideas about how to resolve this issue?

1 ACCEPTED SOLUTION
v-kkf-msft
Community Support
Community Support

Hi @gaurangross ,

 

If it is a report on Service that is not showing the latest data, please try refreshing the browser page or clearing the browser cache then reopen the report, which will clear the report's cache and show the latest data.


If it is an embedded report, based on my testing, when you refresh the dataset, the latest data is not immediately reflected in the embedded report. It is recommended that you run the following code for the embedded report after the dataset is refreshed and it will refresh the report to display the latest data.

 

// Refresh the displayed report
try {
    await report.refresh();
    console.log("Refreshed");
}
catch (errors) {
    console.log(errors);
}

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-kkf-msft
Community Support
Community Support

Hi @gaurangross ,

 

If it is a report on Service that is not showing the latest data, please try refreshing the browser page or clearing the browser cache then reopen the report, which will clear the report's cache and show the latest data.


If it is an embedded report, based on my testing, when you refresh the dataset, the latest data is not immediately reflected in the embedded report. It is recommended that you run the following code for the embedded report after the dataset is refreshed and it will refresh the report to display the latest data.

 

// Refresh the displayed report
try {
    await report.refresh();
    console.log("Refreshed");
}
catch (errors) {
    console.log(errors);
}

 

If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
Winniz
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Winniz, 

 

Thanks for your reply. I tried to refresh the report as you mention but it does not seem to be working. 

 

As per the official documentation https://docs.microsoft.com/en-us/javascript/api/powerbi/powerbi-client/report.report#powerbi-client-...

Refresh() method only refresh the data source, but in this case, we want to refresh the report (visuals). 

 

I think this is one of the basic things that not sure why the PowerBI team is not willing to do.  As per this post https://ideas.powerbi.com/ideas/idea/?ideaid=39ba67cf-724e-4b6c-9906-51163749f759&page=3, this issue has been reported since 2015 but no resolution. the report will load with whatever selection the author saved or saved when the report is published.

 

Thanks,

 

MikeJohnsonZA
Responsive Resident
Responsive Resident

You need to deselect the sliced before uploading it to the service.

 

Power BI defaults to the slicer selection that was made and valid when the report was saved and published.

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.