Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi All,
I am very new to Power BI and trying to understand how RLS works. In the process, as a first step I am trying to get the username() value in the report, but it does not bring any value.
I created a measure and used it as below:
Can someone please help me out as to why it is showing blank.
Thanks
Poojitha
Solved! Go to Solution.
HI
Both funcion username and userpricipalname works when you place them in Table or card
If u just drag them to raport dosnt work (default is chart )
Desktop
Serwice
Hi @Anonymous ,
Which type of account are you logged into Windows? Is it a guest account?
Try to use
https://dax.guide/userprincipalname/
I make RLS with this and works fine
https://radacad.com/dynamic-row-level-security-with-power-bi-made-simple
I followed the same steps but I still dont see any value.
HI
Both funcion username and userpricipalname works when you place them in Table or card
If u just drag them to raport dosnt work (default is chart )
Desktop
Serwice
From memory its because you are in the Power BI desktop and you aren't connected by a username. Try publishing your report into your "My Workspace" and testing this again. You'll likely find it will work there.
I published to Service and I still cannot see the username field.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.