Forum Discussion

gaurangross's avatar
gaurangross
Regular Visitor
4 years ago
Solved

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?

  • 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.

3 Replies

  • MikeJohnsonZA's avatar
    MikeJohnsonZA
    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.

     

  • v-kkf-msft's avatar
    v-kkf-msft
    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.