Forum Discussion

Nashrin's avatar
Nashrin
Frequent Visitor
1 year ago
Solved

Not able to save Dynamic RLS code on Datamart - DAX editor

I trying to implement dymnamis rls for my datamart. While saving my rls dax code, I'm getting the below error at fabric platform. Underlying Error: {"code":"UnexpectedDatamartFailure","pbi.error":...
  • v-veshwara-msft's avatar
    v-veshwara-msft
    1 year ago

    Hi Nashrin ,

    Thank you for your update, and I appreciate you confirming this with Microsoft Support. It’s helpful to have clarity directly from the source.

    As you've pointed out, datamarts in Microsoft Fabric currently don’t support dynamic Row-Level Security (RLS) using DAX expressions like USERNAME() or USERPRINCIPALNAME(). I understand this may be disappointing, especially if dynamic RLS is a key requirement for your setup.
    Control access to datamarts (preview) - Power BI | Microsoft Learn

    Alternatives:

    1. Consider Using Power BI Datasets:
      If dynamic RLS is critical, one option is to move your RLS logic to a Power BI dataset. Power BI datasets fully support dynamic DAX filters and provide greater flexibility for defining user-based roles.

    2. Leverage Existing Datamart Features:
      If moving to a dataset isn’t feasible, you could use static roles within the datamart's enhanced RLS editor, although this would be less dynamic.

    Please let us know if you’d like help setting up RLS in a dataset or need assistance exploring alternative solutions.

    Lastly, if you’ve found the reply helpful, please close this issue by marking it as the accepted solution. Doing so helps others in the community who might face similar challenges.

    Best Regards,
    Vinay kumar.