Forum Discussion
Filter by user logged in
Hello everyone,
This is yes or no question, probably really simple one.
I have report which contains data about employees. How much cases they solved, how many hours they spent resolving certain issues etc. - basically it's their performance. Data is filtered by employees and teams and everyone can see everything. Question is - when an employee opens that report, can those filters be automatically selected so it shows data for that one person who opened the report? So it would probably be a DAX formula which goes to filter/slicer and selects employee based on user who is logged in and who is viewing the report.
8 Replies
- skusuljaFrequent Visitor
I do not want row level security (RLS) as a feature. I need that all data is visible to others. Just default that it is filter (visualization) to a particular user.
I have thought to add new DAX column to my Users table with expression:
CurrentUser = IF(USERPRINCIPALNAME()=Employees[SystemUser.UserName],TRUE(),FALSE())However, I have error:CUSTOMDATA, USERNAME, USERCULTURE and USERPRINCIPALNAME functions are not supported in calculated tables/columns. These functions may only be used in Measures or in the AllowedRowsExpression.Ok, but is there any other way to set default filter on visualization to a current user?- Pragati11Super User
Hi skusulja ,
- If you are planning to share a single dashboard to multiple users then Row-Level security is the approach that should adopt.
- If you are planning to distribute multiple dashboards for individual users than you can go with filter on Username. But, this approach is not the right way to go forward with.
Thanks,
Pragati
- Pragati11Super User
Hi skusulja ,
You can look into Row-level security in Power BI.
https://radacad.com/row-level-security-configuration-in-power-bi-desktop
Thanks,
Pragati
- EKPuurNew Member
Hey everyone,
Is there someone who has a solution for this problem in the meantime?
If want to do the same thing as asked here so I was wondering if someone has some tips on how to do this.
Thank you in advance!