cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FXGE310
Regular Visitor

If then statement multiple tables

I am trying to calculate a Sum of a column based on two conditions from two different tables. 

Condition 1:

  • Table 1: 'Product Catalog' 
  • Column: 'Treatment Impact' 
  • Value needed form the colum is "Water" 

Conditon 2:

  • Table 2: 'Cost Element' 
  • Column 2: 'Cost Subcategory'
  • Value needed is "Treating-Water" 

Sum Table 

  •  Table: OpEX Detail
  • Column: 'Amount'

I need both of those conditions met to then calculate the sum. Please let me know if is possible. 

This wa sone of my attempts that did not work: 

Water OpEx Total $ = CALCULATE(SUM('OpEx Detail'[Amount]),FILTER('Product Catalog','Product Catalog'[Treatment Impact]="Water"),FILTER('Cost Element','Cost Element'[Cost Subcategory]="Treating-Water"))
2 REPLIES 2
V-pazhen-msft
Community Support
Community Support

@FXGE310 

The problem is the relationships between the three tables. For now, you can try used related and relatedtable function to referent the filters depend on your relationship. 

For absolute solution, we would need your sample pbix file including relationship.

Best,
Paul

CoreyP
Resolver III
Resolver III

Can you post sample data from all of your tables and indicate if there are any relationships present?

 

Thanks

Helpful resources

Announcements
PBI_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

MBAS on Demand

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Get Ready for Power BI Dev Camp

Microsoft named a Leader in The Forrester Wave

Microsoft received the highest score of any vendor in both the strategy and current offering categories.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.