The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
I'm implementing RLS and while doing so need to filter the data based on the User who has logged in. So that each user only sees his or her own records. The 2 DAX functions username() and userprincipalname() return the domain user name and the email address.
example:
username() returns AD\edwardh
userprincipalname() returns edward.hall@xxxx.com
What I need is the full name: Edward Hall for comparision to the data. How can this be extracted?
Solved! Go to Solution.
Hi Gilbert,
Thansk for your reply but my data is following format:
SalespersonName Country Sales
-----------------------------------------------------
Edward Hall Singapore 10,000
Mark Twain UK 20,000
On the query I want apply the filter [SalespersonName] = <Name of the user who is viewing the report>
USERPRINCIPALNAME() will return is edward.hall@xx.com which I can't equate to the Salesperosn Name. The email might not always have the user full name as well, For Mark email can be mark.t@xxx.com, so I cnat derive the Full Name from email address.
That worked! Thanks Gilbert!