To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have this issue and would like to know if anyone has a workaround to it.@@@
Here is the PBIX link
@Anonymous.mailbox@gmail.com
No can do. RLS is purely dynamic, can only work with measures. Hard coding it into calculated columns is a security no-no.
Let your data model do the work.
Oh, and by the way - USERNAME() doesn't help you once you publish the app. Use USERPRINCIPALNAME() instead.
Thank you, @lbendlin
Your first sentence: did you mean to say, no can't do it?
Just so you know, our use-case is PowerBI embedded - users are using app-own authentication. So we are passing the username from our application. Our data model clearly takes care of our requirement. The challenge we have is abilty to create a column to identity default user using the simpe transformation described. Also, USERNAME() and USERPRINCIPALNAME() give us same result.
I didn't realize you were on embedded. My statement was for service.
I already told you my recommendation - Let your data model do the work.
Do not attempt to "workaround" an implicit and intentional feature of the app (aka "fighting the API"). In the long run you can't win that fight.