Sum based on another table

Hello Brain-trusts!

I am trying to calculate the total sales of each operator based on a condition in another table.

Here is an example of what I am trying to get.

I have 3 tables below and I would like to get a sum of “Price” for each Operator’s First Name, if the “InternalUse” column is “True” in the “Client” table.

image

I might be able to create a calculated column in the “Sales” table with True/False InternalUse, but I am keen to learn if I can do it with DAX.

Thank you for all the responses!

Chris.

Bumping this post for more visibility from our experts and users.

Hi @ChrisHan - Please share a sample PBIX file.

1 Like

Hi Ankit,

Thank you for the response!

I actually found out how to fix it from one of the Enterprise DNA course. :slight_smile:

What I did was;

Calculate( [Total Sales], 
    Filter( Client, Client[InternalUse] = "Internal" ) )

What I also did wrong initially was that the “InternalUse” column was “True” or “False”, so I changed the column to “Internal” or “External”.

Thank you!

Chris Han.

1 Like

@ChrisHan Great. Can you please mark this post as closed