The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hello,
I have a table that shows production and I would like all employees to see everyone's production but only see their own name (the rest of the names should be blank). This I have achieved using this DAX below. However, if the user logged in is a supervisor (the Employees table has a Supervisor column with a Yes or No value), there should be no filters and he/she should see all data. In the screenshot below, if Princess Leia is a supervisor, she should see all the Employee Names. Also, the supervisor may or may not have production numbers in the table. Any suggestions for how to do this? I would appreciate any help please.
Production:
I thought about maybe having a separate Supervisor table that contains a list of supervisors?
You need two copies of your fact table. One table is visible without names. You create measures for "Mine" and "Others". The other table is hidden and has the names. Use RLS to control access to the hidden table.
Thanks! Do you know how I would go about using RLS to access to access the hidden table? When I tried this, it still filtered the hidden the table and only showed me my data. I think it's because under Manage Roles, my table filter is [LogInEmail] = USERPRINCIPALNAME()? Do you know what I should use? I'm fairly new at Power BI & DAX... appreciate any help.
This article may help you Managing hierarchical organizations in Power BI security roles - SQLBI
User | Count |
---|---|
25 | |
10 | |
8 | |
6 | |
6 |
User | Count |
---|---|
31 | |
12 | |
10 | |
10 | |
9 |