Forum Discussion
How to use slicers from one data source to filter another data source?
Hello,
I'm a Power Bi newbie and trying to create a report to show Employee count and Vacancy count using two data sources as below.
1. Employee data
| Year | Month | Country | Department | Emp No |
| 2022 | Sep | A | Dep 1 | 1 |
| 2022 | Sep | A | Dep 2 | 2 |
| 2022 | Sep | B | Dep 3 | 3 |
| 2022 | Sep | B | Dep 3 | 4 |
| 2022 | Oct | A | Dep 1 | 1 |
| 2022 | Oct | A | Dep 2 | 2 |
| 2022 | Oct | A | Dep 2 | 5 |
| 2022 | Oct | B | Dep 3 | 3 |
| 2022 | Oct | B | Dep 3 | 4 |
2. Vacancies data
| Year | Month | Country | Dep Name | Role No |
| 2022 | Oct | A | Dep 1 | r1 |
| 2022 | Oct | A | Dep 1 | r2 |
| 2022 | Oct | B | Dep 3 | r3 |
| 2022 | Oct | B | Dep 4 | r4 |
| 2022 | Sep | A | Dep 1 | r5 |
I have set up four slicers for employee count: Year, month, country and department name. I am trying to use the same filters for vacancy count as well.
The Vacancies data has similar fields as well, but may have different values (Eg: Dep 4 is found only in Vacancies data, and not included in Emloyees data).
What I tried: I created many-to-many relationships between the two tables, but Power Bi says that I can have only one active filter. I'm not sure if this is the right way to go for what I'm trying to implement.
How can I use the same four filters for both employee and vacancy count? Any help would be much appreciated.
Thanks in advance!
Hi Fleur ,
You need to create slicer table ,then use slicer table to slice:
create relationship:
Output:
Best Regards
Lucien
2 Replies
- amitchandak
Super User
Fleur , You have to create common Tables, like date, employee etc and use along with that
- v-luwang-msft
Community Support
Hi Fleur ,
You need to create slicer table ,then use slicer table to slice:
create relationship:
Output:
Best Regards
Lucien