Forum Discussion
Anonymous
5 years agoNot applicable
Supervisor Role Filtering
Hey there, I have a report that I want to have two views: A employee view where the report filters my table based on employee email A supervisor view where the report filters my table based ...
- 5 years ago
Hi, Anonymous
Based on your description, I created data to reproduce your scenario. The pbix file is attached in the end.
Table:
Mode:
You may create a measurea as below.
Visual Control = var emp = SELECTEDVALUE('Table'[Employee],"") var sup = SELECTEDVALUE('Table'[Supervisor],"") return IF( ISFILTERED(Mode[Mode]), IF( "employee mode" in DISTINCT(Mode[Mode])&&NOT("supervisor mode" in DISTINCT(Mode[Mode])), IF( emp=USERPRINCIPALNAME(),1,0 ), IF( "supervisor mode" in DISTINCT(Mode[Mode])&&NOT("employee mode" in DISTINCT(Mode[Mode])), IF( sup=USERPRINCIPALNAME(), 1,0 ), IF( "employee mode" in DISTINCT(Mode[Mode])&&"supervisor mode" in DISTINCT(Mode[Mode]), IF( OR( emp=USERPRINCIPALNAME(), sup=USERPRINCIPALNAME() ), 1,0 ) ) ) ) )Then you need to put the measure in the visual level filter and use 'Mode' column from 'Mode' table to filter the result.
Finally you may view as '[email protected]'. Here are the results.
Best Regards
Allan
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
5 years agoNot applicable
Hi Anonymous - data seems incomplete. What i understood is you have 2 different tables? Employee and Supervisor, how are they related/Linked to each other?
Can you give some sample data and their relation please? like the one below
Thanks,
-Namish B