Forum Discussion
An unexpected error occurred (file '', line , function '')
- 1 year ago
Hi,
After installing on several devices and noticing that some returned errors while others didn’t, I compared the system information of each one and found that the issue, in this case, is related to AVX CPU extension support. One of the VMs didn’t inherit this extension from the host, and once it was enabled, the error disappeared.
We can conclude that the error is related to CPUs lacking the AVX extension.
Best Regards.
Hey Nuno_Santos ,
The error message:
An unexpected error occurred (file '', line , function '')
after updating to the May 2025 version of Power BI Report Server (PBIRS), particularly triggered by date slicers, appears to be a regression or compatibility issue introduced in the new release.
Root Cause (Based on Behavior)
Since you mentioned: "If I delete the date slicer visual and redeploy, the error is gone."
this strongly points to a breaking change in how date slicers are processed/rendered in the May 2025 version.
This issue has been observed in previous updates as well, where:
Report visuals created using older versions of Power BI Desktop (especially slicers with relative or hierarchical filtering) break after a server update.
Sometimes serialized visuals (like date slicers) fail to rehydrate properly due to a schema or engine update.
Certain slicer configurations might not be supported anymore or require a fresh re-creation from the latest Power BI Desktop for Report Server.
Recommended Workarounds
Use the Matching May 2025 Power BI Desktop for PBIRS
Ensure you’re editing reports with the same version of Power BI Desktop that corresponds to May 2025 PBIRS. Do not use the standard (cloud) Power BI Desktop version.Download from Microsoft (check for "Power BI Desktop (Report Server)" – May 2025 version)
Delete and Recreate the Date Slicer
As you already noticed, recreating the slicer eliminates the error. To minimize future issues:Use the "Between" mode rather than relative date slicers.
Avoid any deprecated or custom slicer visuals.
Test with Static Dates or Basic Filters: If date ranges are not mandatory for interaction, consider using dropdown or list slicers temporarily.
Review Report Logs: Enable and check PBIRS logs (RSHostingService.log) for more detailed stack traces that might indicate failing visual components.
- Long-Term Fix:
If the issue is confirmed as a bug introduced in the May 2025 PBIRS, Microsoft will likely address it in the August or September 2025 update. Keep an eye on:
Temporary Mitigation: If this issue affects multiple reports:
Batch reprocess slicers using a macro/script to regenerate affected visuals (if many reports are involved).
Report the bug to Microsoft via their support channel with reproduction steps and logs.
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam
Can you tell me more about your macro/script idea?
- Nasif_Azam1 year agoSuper User
Hey lstanczyk1 ,
If you are dealing with several reports that have slicer-related issues, automating the slicer recreation can save you significant time. To automate recreating date slicers across multiple reports using macro/script, you can use the following methods:
PowerShell Script: Automate the process of identifying, removing, and recreating date slicers in multiple PBIX files, then republish the updated reports.
Power BI REST API: Write a custom script to interact with Power BI reports, replacing the date slicers programmatically and automating the update process.
Template Approach: Create a reusable Power BI template with the correct slicer configuration, then copy visuals into other reports.
Third-Party Tools: Use tools that can batch-edit PBIX files, allowing for easier slicer management across multiple reports.
For Detailed Information:
PowerShell Scripting for Power BI
Power BI REST API Documentation
Automate Power BI Service with Power Automate
If you found this solution helpful, please consider accepting it and giving it a kudos (Like) it’s greatly appreciated and helps others find the solution more easily.
Best Regards,
Nasif Azam