Forum Discussion
Userprincipalname if statement
I want to make a statement where when a specific user logs in, they see there name only but all other users names appear as blank, or an x. If I have 26 users, A - Z, and user A logs in, they can only see there name but all other 25 names will show as X. I dont want to eliminate the other users rows as the visual compares User A's averages to the group's average. I will attach a photo to explain that. So, you can see, the red is the individual and the blue is the group. I want to keep all the numbers limit the users view to names where they only see their own name.
Hi jlee724
One method is to use Row-level security to mask all names but that of the current user.
See this Medium post for something similar.
As an example, I've attached a PBIX.
Model diagram:
The Salesperson table (filtered using RLS on User = [email protected]😞
The RLS filter is on the Salesperson table:
When [email protected] is the current user, all other Salespeople appear as "X":
1 Reply
- OwenAugerSuper User
Hi jlee724
One method is to use Row-level security to mask all names but that of the current user.
See this Medium post for something similar.
As an example, I've attached a PBIX.
Model diagram:
The Salesperson table (filtered using RLS on User = [email protected]😞
The RLS filter is on the Salesperson table:
When [email protected] is the current user, all other Salespeople appear as "X":