There were already written few blog posts both about Row Level Security. I would like to add one more about this topic. I use this pattern for several years in SQL Server Analysis Services. Biggest a...
I'm currently preparing a slide deck on Dynamic RLS and came across your blog post. I tested your solution. Whenever I want to replace the string value "domain\user" with the USERNAME() or USERPRINCIPALNAME() function, I get the following error: "The CUSTOMDATA function and the USERNAME function are not supported in calculated columns. These functions must only be used in measures or in 'AllowedRowsExpression'."
If I use the string it works perfectly fine. Can you double-check this behavior in your model? Data model with relationships and "security_mapping" table and calculated column "Security"
Function USERNAME behaves differently in desktop where it returns username in format “domain\username” and when published to powerbi.com where it returns email address [email protected]
Therefore before publihing replace column USER with column EMAIL in DAX formula
In this blog post I covered how to implement dynamic security in Power BI without relationships in data model using DAX formulas. Let me know if you have any questions or comments