Skip to main content
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Using RLS employee should see data for his organizational group as well as all his reportees data

Below is the Employee table showing Emp id , emp name email,Organization group, manager id , name and email. Each employee is assigned to more than one group (here 2 groups).

VeenaAnalyst_0-1711891347154.png

Another is the sales table showing sales data for employee.

VeenaAnalyst_1-1711891402036.png

When an employee "Leia Organa" view the report she should see data for the groups she is assigned (Technical chief group ,cloud computing group) as well as her reportees data.

reportees Hierarchy.

VeenaAnalyst_4-1711891741506.png

 

This should be the final result in powerbi. 

VeenaAnalyst_3-1711891628236.png

Immediate help would be appreciated!

1 ACCEPTED SOLUTION
Chakravarthy
Resolver II
Resolver II

Hi @Anonymous 

This should be model

Chakravarthy_0-1711910427450.png

This should be Joins between tables:

Chakravarthy_1-1711910492133.png

Table DAX Code:

1. DISTINCT_EMP = DISTINCT(Employee[Employee Email])
2. BRIDGE =
VAR TABLE1 =
            SUMMARIZECOLUMNS(
                Employee[Employee Email],
                Employee[Manager Email]
            )

VAR TABLE2 =
            SUMMARIZE(
                Employee,
                Employee[Employee Email],
                "Manager Email", Employee[Employee Email]
            )

RETURN
UNION
(
    TABLE1,
    TABLE2
)
 
3. BRIDGE1 = DISTINCT_EMP
Please check this "Apply Security  Filter on Both Sides" when joining BRIDE and BRIDGE1
Chakravarthy_2-1711910651889.png

In Manage Roles:

Chakravarthy_3-1711910808978.png

 

Hope I answered your RLS. If so, please provide Kudos and encourage me.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Thanks for you reply @Chakravarthy . But here it shows data for only that particular employee. It doesnt show data for their reportees. If I select " Leia Organa", it should show data for 1.  " Leia Organa" 2. Kylo Ren 3.Darth Maul.   Leia Organa is Manager of Kylo Ren and Darth Maul.

@Anonymous When I select "Leia Organa" It is showing "Kylo Ren" and "Darth Maul" Below is the screenshot 

Chakravarthy_0-1711959030244.png

 

Anonymous
Not applicable

@Chakravarthy .Kindly ignore previous reply\post since it worked !. Ihere was issue in relationship between Distinct_emp and Bridge table. After I correct that it worked !!Thanks. Accepted as solution. Thanks for your immediate help!.

Anonymous
Not applicable

Hi @Chakravarthy , I have created tables and relatioship as shown by you. But it is not working.

VeenaAnalyst_0-1711960032907.png

Not sufre where it goes wrong.

VeenaAnalyst_1-1711960064278.png

Could you please send your .pbix file to refer?

Chakravarthy
Resolver II
Resolver II

Hi @Anonymous 

This should be model

Chakravarthy_0-1711910427450.png

This should be Joins between tables:

Chakravarthy_1-1711910492133.png

Table DAX Code:

1. DISTINCT_EMP = DISTINCT(Employee[Employee Email])
2. BRIDGE =
VAR TABLE1 =
            SUMMARIZECOLUMNS(
                Employee[Employee Email],
                Employee[Manager Email]
            )

VAR TABLE2 =
            SUMMARIZE(
                Employee,
                Employee[Employee Email],
                "Manager Email", Employee[Employee Email]
            )

RETURN
UNION
(
    TABLE1,
    TABLE2
)
 
3. BRIDGE1 = DISTINCT_EMP
Please check this "Apply Security  Filter on Both Sides" when joining BRIDE and BRIDGE1
Chakravarthy_2-1711910651889.png

In Manage Roles:

Chakravarthy_3-1711910808978.png

 

Hope I answered your RLS. If so, please provide Kudos and encourage me.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.