DAX SUM IF where 2 Columns in 2 different Tables Match

j0nthn

New Member
Joined
Jan 7, 2016
Messages
25
Hi,

Is there a formula that let's me SUM a value (i.e. 'Data'[Clicks]) where two columns in two different tables match (i.e. 'Data'[Week] = 'Landing Page'[Week] AND 'Data'[Page] = 'Landing Page'[Landing Page] )

I've been looking at different combinations of SUM, SUMX, FILTER and ALL, but DAX seems to be very limited in this aspect, whereas I would be easily able to do this using a regular excel formula..

Thanks in advance,
Jon
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
but DAX seems to be very limited in this aspect

DAX is very powerful in this space.


You don't really provide enough info here for me to help you. Are you wanting a measure or a calc column? Are the other tables lookup tables or data tables? Maybe post a sample workbook.
 
Last edited:
Upvote 0
I have two tables, that look like this, that are linked through the KEY field (one-to-many relationship)

KEY TABLE (all unique values)
KeyRevenue
1x
2x

<tbody>
</tbody>

Data table (might contain duplicate values)
KeyRevenue
16
26

<tbody>
</tbody>

The 'Key' fields in both tables are linked through a relationship, I can use the RELATED function in the 'Data table' to find values, but it doesn't work in the KEY table. Do you know how to fill in the x's in the Key table?

Best,
Jon
 
Upvote 0
I cannot believe it's this simple.. I tried that but with a USERELATIONSHIP function behind it
Thank you so much,
Best
Jon
 
Upvote 0
Well it looks simple, but there is a lot to learn to truly understand how power pivot works - this formula included. To understand this formula, you really need to understand row context, filter context, context transition and filter propagation. Once you have the principles down, it is obviously easier to move forward. I wrote my book to help Excel users get started with Power Pivot if you are interested.
Learn to Write DAX - the book for all Excel users
 
Last edited:
Upvote 0

Forum statistics

Threads
1,222,091
Messages
6,163,855
Members
451,861
Latest member
Lurch65

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top