cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
cbsp Occasional Visitor
Occasional Visitor

DAX function that acts as SUMIF

Hello,

 

I want to create a column in one table that first checks to see if two values match, and thens Sums the corresponding values in the new column.  In this case I would be checking to see if the counties match, and then summing the corresponding values. 

 

Here are the two tables I am working with. 

Screenshot (2).pngScreenshot (5).png

 

So in the end I want to Match CountyS with county Name, and then sum the values from WP_Plant into a new column matching the respective county. Any help would be greatly appreciated. Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
Super User IV
Super User IV

Re: DAX function that acts as SUMIF

Hello @cbsp 

I assume you want to add the colmn to the second table?  If they are joined from 'Table1'[County Name] to 'Table2'[CountyS] the you can do by adding a column in Table 2 with this measure.

CALCULATE( SUM ( Table1[WP_Plant] ), RELATEDTABLE( Table1 ) )

View solution in original post

2 REPLIES 2
AClerk New Contributor
New Contributor

Re: DAX function that acts as SUMIF

Hi @cbsp 

Please provide the data in a way we could copy&paste it. Or attach your PBIX file.

Also, please provide the expected results.

Thanks!
A

Super User IV
Super User IV

Re: DAX function that acts as SUMIF

Hello @cbsp 

I assume you want to add the colmn to the second table?  If they are joined from 'Table1'[County Name] to 'Table2'[CountyS] the you can do by adding a column in Table 2 with this measure.

CALCULATE( SUM ( Table1[WP_Plant] ), RELATEDTABLE( Table1 ) )

View solution in original post

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors