The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends September 15. Request your voucher.
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:
I think it has to deal with 'dept_emp' table since there's no direct relationship between 'employees' and 'departments' tables.
Can somebody help?
Solved! Go to Solution.
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" :
Then the count will be dynamically changed by the department selections:
Best Regards
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"
)
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" :
Then the count will be dynamically changed by the department selections:
Best Regards
User | Count |
---|---|
15 | |
12 | |
8 | |
7 | |
7 |
User | Count |
---|---|
24 | |
20 | |
12 | |
10 | |
7 |