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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
jkim3743
New Member

DAX measure over different tables. Make interaction between tables.

DAX measure over different tables. Make interaction between tables.
 

I need to make interactions between tables.

1. departments table: contains department name.

2. employees table: contains sex. 

 

I created male/female count. I want to have interaction so when I click each department button, gender distribution changes by each department.

 

Here's my measure: 

Male Count = CALCULATE(COUNTA(employees[sex]), (employees[sex]) = "M")
Female Count = CALCULATE(COUNTA(employees[sex]), (employees[sex]) = "F")
 
However, when I click each department button, gender distribution chart does not change even if I turn interaction on.
 
Here's my relationships and dashboardCapture.PNG
jkim3743_0-1735158110387.png

 

 

I think it has to deal with 'dept_emp' table since there's no direct relationship between 'employees' and 'departments' tables.

Can somebody help?

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @jkim3743 ,

I created a sample pbix file(see the attachment), please check if that is what you want. Please change the Cross-filter direction between the table 'dept_emp' and 'employees' as "Both" :

vyiruanmsft_0-1735178764570.png

Then the count will be dynamically changed by the department selections:

vyiruanmsft_0-1735179115904.png

Best Regards

View solution in original post

2 REPLIES 2
Jihwan_Kim
Super User
Super User

Hi,

Please try something like below, if you cannot change the filter direction in the data model.

 

Male Count =
CALCULATE (
    COUNTROWS ( SUMMARIZE ( dept_emp, employees[sex] ) ),
    employees[sex] = "M"
)

 

Female Count =
CALCULATE (
    COUNTROWS ( SUMMARIZE ( dept_emp, employees[sex] ) ),
    employees[sex] = "F"
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Hi @jkim3743 ,

I created a sample pbix file(see the attachment), please check if that is what you want. Please change the Cross-filter direction between the table 'dept_emp' and 'employees' as "Both" :

vyiruanmsft_0-1735178764570.png

Then the count will be dynamically changed by the department selections:

vyiruanmsft_0-1735179115904.png

Best Regards

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!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 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.