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

Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now

Reply
jack3
Microsoft Employee
Microsoft Employee

Filter two separate data sets using one filter

I have two data sets and I want to be able to filter them using one filter. Both data sets are seperate and there is no unique indentifier that can be used to create a relationship between the two tables.

 

However, I want to filter them on common columns that they both have, Market, Product, etc. Is there any way of doing this?

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@jack3 , Do you have common tables for those, if not create common tables.

The first one should work ideally, But in the new version, it is not, so try one of the three. It gives circular dependency error

 

new table like

product = distinct(union(all(Dataset1[Product]),all(Dataset2[Product])))
product =distinct(union(distinct(Dataset1[Product]),distinct(Dataset2[Product])))
product = summarize(union(distinct(Dataset1[Product]),distinct(Dataset2[Product])),[Product])

Create for others too and join and the analyze with common dimesion

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

3 REPLIES 3
v-shex-msft
Community Support
Community Support

HI @jack3,

If your dataset relationship is based on multiple fields, you can also take a look at the following blog to know how to build a relationship between multiple columns:
Relationship in Power BI with Multiple Columns 

Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
amitchandak
Super User
Super User

@jack3 , Do you have common tables for those, if not create common tables.

The first one should work ideally, But in the new version, it is not, so try one of the three. It gives circular dependency error

 

new table like

product = distinct(union(all(Dataset1[Product]),all(Dataset2[Product])))
product =distinct(union(distinct(Dataset1[Product]),distinct(Dataset2[Product])))
product = summarize(union(distinct(Dataset1[Product]),distinct(Dataset2[Product])),[Product])

Create for others too and join and the analyze with common dimesion

 

 

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here
Pragati11
Super User
Super User

HI @jack3 ,

 

Let's take an example of PRODUCT column which exists in both of your tables.

Create a bridge table PRODUCT MAPPING, which will have a single column PRODUCT. This column will have distinct values of PRODUCT from both the tables.

For e.g. TABLE 1 has PRODUCT = P1, P2, P3

             TABLE 2 has PRODUCT = P4, P2, P5

             PRODUCT MAPPING will have PRODUCT = P1, P2, P3, P4, P5

 

Now use this PRODCUT MAPPING table to create relationship on PRODUCT column with TABLE 1 and TABLE 2 PRODUCT columns.

 

Now create a slicer. Move PRODUCT column from PRODUCT MAPPING  table to this slicer.

When you select anything here, it will filter both the tables of your's.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

Helpful resources

Announcements
OCT PBI Update Carousel

Power BI Monthly Update - October 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

October NL Carousel

Fabric Community Update - October 2024

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