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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

One slicer for 2 different data sources

So I have 2 different data sources in one .pbix file. The first data source is from an excel file and the second data source is from a sharepoint list. These 2 data sources are very similar to each other excluding the values of course. Both of these data sources have a District table and inside it is the 'District Name' column. Now what I want to do is put the 'District Name' column to a slicer so I can filter my visuals based on it but of course it will only filter the ones that came from the same data source and not the ones from the other data source. So my question is how can I make it so that when I put 'District Name' from one data source to a slicer, it will filter both data sources? 

 

Any help would be greatly appreciated!

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , If they are not joined . Then you can that in measure

 

Measure =

calculate(sum(Table2[Name]), filter(Table2, Table2[District] allselected(Table1[District]) ) )

 

Also check Treatas

https://docs.microsoft.com/en-us/dax/treatas-function

 

Other I create a new dimension table and join with both tables and use that

distinct(union(distinct(Table1[District]),distinct(Table2[District])))

 

Bridge Table: https://www.youtube.com/watch?v=Bkf35Roman8&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=19

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , If they are not joined . Then you can that in measure

 

Measure =

calculate(sum(Table2[Name]), filter(Table2, Table2[District] allselected(Table1[District]) ) )

 

Also check Treatas

https://docs.microsoft.com/en-us/dax/treatas-function

 

Other I create a new dimension table and join with both tables and use that

distinct(union(distinct(Table1[District]),distinct(Table2[District])))

 

Bridge Table: https://www.youtube.com/watch?v=Bkf35Roman8&list=PLPaNVDMhUXGaaqV92SBD5X2hk3TMNlHhb&index=19

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

Find out what's new and trending in the Fabric community.

Top Kudoed Authors