Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 months ago
Solved

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 ...
  • V-yubandi-msft's avatar
    V-yubandi-msft
    7 months ago

    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.