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

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

Reply
akhreis
New Member

Filtering Table based on field in another table

I have headcount data which includes the period, employee ID, employee name, job title, manager ID, and manager name.

 

I'm trying to create a visual where if an employee ID is filtered in Table 1, it will show me that employee's direct reports (those employees that have that employee ID as their Manager ID) in Table 2. I'm also trying to add a second filter on Table 2 to try to toggle between the periods. However, I for the life of me can't figure this out.

 

Below is an overview of the data set:

PeriodEmployee IDNameJob TitleManager IDManager Name
Jan-22001Employee 1CEON/AN/A
Jan-22002Employee 2Director001Employee 1
Jan-22003Employee 3Senior Analyst002Employee 1
Jan-22004Employee 4Senior Analyst002Employee 1
Jan-22005Employee 5Analyst002Employee 1
Feb-22001Employee 1CEON/AN/A
Feb-22002Employee 2Director001Employee 1
Feb-22003Employee 3Senior Analyst002Employee 2
Feb-22004Employee 4Senior Analyst002Employee 2
Feb-22005Employee 5Senior Analyst003Employee 2

 

Table 1

PeriodEmployee IDNameJob TitleManager IDManager Name
Jan-22001Employee 1CEON/AN/A
Feb-22001Employee 1CEON/AN/A

 

Table 2 (Ideal scenario)

PeriodEmployee IDNameJob TitleManager IDManager Name
Jan-22002Employee 2Director001Employee 1
Jan-22003Employee 3Senior Analyst002Employee 1
Jan-22004Employee 4Senior Analyst002Employee 1
Jan-22005Employee 5Analyst002Employee 1
Feb-22002Employee 2Director001Employee 1

 

Unfortunately, there is something that is preventing me from creating a relationship between Employee ID and Manager ID.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @akhreis 

You can create a same table, but it does not have relationship with the original table.

then use the new table as table 1, the original table as table 2

then create a measure in original table"

Measure = IF(ISFILTERED('Table (2)'[Employee ID])=FALSE(),1,IF(MAX('Table'[Manager Name])=MAX('Table (2)'[Name]),1,0))

put the measure to the visual filter of table2

vxinruzhumsft_0-1673243809455.png

 

Output

vxinruzhumsft_1-1673243830103.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @akhreis 

You can create a same table, but it does not have relationship with the original table.

then use the new table as table 1, the original table as table 2

then create a measure in original table"

Measure = IF(ISFILTERED('Table (2)'[Employee ID])=FALSE(),1,IF(MAX('Table'[Manager Name])=MAX('Table (2)'[Name]),1,0))

put the measure to the visual filter of table2

vxinruzhumsft_0-1673243809455.png

 

Output

vxinruzhumsft_1-1673243830103.png

Best Regards!

Yolo Zhu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Woohoo! Perfect!

Idrissshatila
Super User
Super User

Hello @akhreis ,

 

The try doing the relationship between employee ID from table 1 to employee ID from table 2.

 

If I answered your question, please mark my post as solution, Appreciate your Kudos👍

 

Follow me on Linkedin

 

 



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

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.