Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi Team,
I need to filter Data in Opportunity using RLS based on its role.
user: tesuser1
Business Unit : Group1
RLS : domainname = username()
*Group1 may contain more than 1 user
Requirement: (need to satisfy both requirements)
Opportunity Data where business unit is business unit log in user
Opportunity Data where Parent Account Owner is login user
I only created the first requirement using
SystemUser --> Business Unit (get business unit) ---> Opportunity
My problem is 2nd Requirement because in RLS, Union and Merge is not working (regardless who is the user)
*already tried
SystemUser --> Business Unit (get business unit) ---> Opportunity (Id)
SystemUser --> Account ---> Opportunity (Id), then merge both or new table then UNION
Please advice.
Solved! Go to Solution.
I was able to resolved the problem using Manage Role, which create another problem.
Level 1: see all data (no problem)
Level 2: Same with Level 3 but Business Unit will get the Parent and Child
Level 3: Resolve (below)
I was able to resolved the problem using Manage Role, which create another problem.
Level 1: see all data (no problem)
Level 2: Same with Level 3 but Business Unit will get the Parent and Child
Level 3: Resolve (below)
I think you misunderstand my question, because in that relationship I only got business unit to filter Opportunity but Im missing Opportunity Parent Account Owner is login user.
Currently What Im getting;
Opportunity where Business Unit is Business Unit of Login User.
What I need;
Opportunity where Business Unit is Business Unit of Login User +
Oppurtunity where Parent Account Owner is Login User
Hi @rommel20,
So when current user is the manager, you need to load current data and child data, right?
If this is a case, you can take a look at below sample:
Sample tables.
RLS formula: if current user is sales manager, filter on sales manager column, else filter on salesman column
if( ISERROR(SEARCH("SalesManager", [Role]))=FALSE(), [SalesManager]=LOOKUPVALUE(Sheet2[User],Sheet2[Login],USERNAME()) , [SalesMan]=LOOKUPVALUE(Sheet2[User],Sheet2[Login],USERNAME()) )
Result:
Notice: based on setting, I am the 'salesManager1', so I will get all records of salemanger1.
For you scenario, you need to use 'or' to link two part of formulas to filter both 'user' column and 'parent' column.(If current table not contains parent column, you should add it first)
Sample:
OR([User]=LOOKUPVALUE(Sheet2[User],Sheet2[Login],USERNAME()), [Parent]=LOOKUPVALUE(Sheet2[User],Sheet2[Login],USERNAME()))
Regards,
Xiaoxin Sheng
@Rubenvw , I am using CRM as a source, I dont understand how you shape data of system user, opportunity and businessunit?, how can include record with Parent Account owner?
Yes, because in that relationship I only got business unit which filter for Opportunity Data. I am missing record where Parent Account Owner is login user.
HI @rommel20,
Maybe you can turn on the security filter option and try again.
Regards,
Xiaoxin Sheng
@v-shex-msft and @Seth_C_Bauer
regardless if I use both direction in system user and business unit, Im still getting the 1st requirements.
HI @rommel20,
If you modify all bi-filter options of below relationships , does this issue still appears?
Regards,
Xiaoxin Sheng
Hi @rommel20,
As Eno1978 said, I'd like to suggest you can modify your bi filter direction option and try again.('single' filter option only works on one side)
In addtion, I think you should use distinct function to make sure this table not contians dulipate records.
Regards,
Xiaoxin Sheng.
@rommel20 Have you tried making the relationship between businessunits and systemsusers bi-directional?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.