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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Filter data by 2 different filters (multiple relationships)

Hello, I have a problem in PBI, I will try to explain it.
I have this table structure:

1.png

 

I have one main table - ProductionTable. I have 2 more tables with data for cosumtion and ordered quantities. To be able to make relationships and filter by ContractNo and Product number, so I made a two dim tables with unique values. The idea is to filter by ContractNo and to get filtered data by contract from the 3 tables. I have tried a lot of relationships, but when I try to make 2 relationships between these 3 tables, PBI do not allows me.

At the moment my report works only if I put Slicer for ContractNo from the main table, not from the dim table, and the data in last column OrderedQty is not filtered by the ContractNo and shows summarized for all contracts for this specific product.

Thanks!

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , refer if treatas can help

 

https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

 

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: 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

Anonymous
Not applicable

I have watched the video in the article, downloaded the example. pbix files and I think I did it properly.

Thnaks @amitchandak  for the link (https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/ and YouTube video: https://www.youtube.com/watch?v=6WU7Ze32Q3w&feature=emb_title&ab_channel=SQLBI )

I made a measure and my final formula looks like this:

 

ReaminingQTYbyPU = CALCULATE(
SUM(PurchasingTable[RemainingQTY]),
TREATAS(
SUMMARIZE( MainTable , MainTable[ContractNo]),
PurchasingTable[ContractNo])
)

 

View solution in original post

4 REPLIES 4
Anonymous
Not applicable

I have watched the video in the article, downloaded the example. pbix files and I think I did it properly.

Thnaks @amitchandak  for the link (https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/ and YouTube video: https://www.youtube.com/watch?v=6WU7Ze32Q3w&feature=emb_title&ab_channel=SQLBI )

I made a measure and my final formula looks like this:

 

ReaminingQTYbyPU = CALCULATE(
SUM(PurchasingTable[RemainingQTY]),
TREATAS(
SUMMARIZE( MainTable , MainTable[ContractNo]),
PurchasingTable[ContractNo])
)

 

Anonymous
Not applicable

Hi @Anonymous 

From you screenshot, I found that there will be loops in your relationship.

Please read this blog for more details: Adjusting Cross filter direction for a complex set of tables and relationships

Due to I don't know you data model, I think if you want to get the result which will be filtered by 2 different filters, you can try to build a measure by dax.

You may refer to this blog for more details about how to build a measure: Create Measure using a different filter for two columns

If this reply still couldn't help you solve your problem, please share a sample with me by your Onedrive for Business.

 

Best Regards,

Rico Zhou

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly. 

amitchandak
Super User
Super User

@Anonymous , refer if treatas can help

 

https://www.sqlbi.com/articles/propagate-filters-using-treatas-in-dax/

 

 

Can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hello @amitchandak Here is a screenshot of the relationship ana data model:

ultrashock_0-1614069811378.png

If you tell me how to delete or replace sencitive data I can attach a .pbix file, but now it is full with company data. The other mtethod is to send me your email and I can send .pbix to you.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

Top Solution Authors
Top Kudoed Authors