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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
Anonymous
Not applicable

PowerBI Expression Evaluation Thread Delegation

I am working on locale-aware formatting using a custom C# helper, whose DLL is referenced in the report server.

I am updating the Thread Culture to the specific culture so that the ToString() can format the datetime and amount correctly.
I didn't want to use ToString(format, CultureProvider) as this is slower than ToString() and can take more time to load the data if the report contains 100k or more rows.

I set the ThreadCulture in the constructor of my helper class and create an instance of it in the report. I am using this approach to have a centralised formatting helper and have control over it.

Is it possible that the report may delegate the expression evaluation to a different Thread?

1 ACCEPTED SOLUTION

Hi @Anonymous ,

Thank you for confirming. Since you are using Power BI Report Server, please note that it operates on the same report processing engine as SSRS. With this engine, report expressions may be evaluated across multiple threads, depending on how the report is processed and rendered. As a result, changes to Thread.CurrentThread.CurrentCulture may not persist throughout all expression evaluations.

 

While setting the thread culture in a custom helper might sometimes work, it is not a reliable or supported solution in Power BI Report Server.

 

For consistent and predictable formatting, it is best to explicitly specify the culture when formatting values, such as by using ToString or by passing the culture to your helper methods.

 

I hope this clarifies the situation. If I’ve misunderstood any part of your situation, please let us know.

 

Regards,

Yugandhar.

View solution in original post

6 REPLIES 6
Anonymous
Not applicable

Hi @V-yubandi-msft ,

 

Thank you for your response. This clarifies my query.

Thank you for your response, and we appreciate you staying engaged with the community moving forward.

V-yubandi-msft
Community Support
Community Support

Hi @Anonymous ,

If you have time, please review my previous response and let us know if any additional details or clarification are needed.

 

Thank you.

V-yubandi-msft
Community Support
Community Support

Hi @Anonymous ,

Thanks for reaching out to the Fabric Community. Just to clarify and better understand the scenario, are you trying this in SSRS?

 

Regards,

Yugandhar.

Anonymous
Not applicable

I am using PowerBI Report Server

Hi @Anonymous ,

Thank you for confirming. Since you are using Power BI Report Server, please note that it operates on the same report processing engine as SSRS. With this engine, report expressions may be evaluated across multiple threads, depending on how the report is processed and rendered. As a result, changes to Thread.CurrentThread.CurrentCulture may not persist throughout all expression evaluations.

 

While setting the thread culture in a custom helper might sometimes work, it is not a reliable or supported solution in Power BI Report Server.

 

For consistent and predictable formatting, it is best to explicitly specify the culture when formatting values, such as by using ToString or by passing the culture to your helper methods.

 

I hope this clarifies the situation. If I’ve misunderstood any part of your situation, please let us know.

 

Regards,

Yugandhar.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.