cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Left join in dax

Hi all, 

 

What method should I be using if I were to achieve the same results as below?

 

SQL query:
image.png

 

 

 

 

It is similar to this:

 

Customer Table

image.png

 

 

 

 

 

 

 

Customer_details Table:

 

image.png

 

 

 

 

 

 

 

 

 

 

Expected Results (measure):

image.png

 

 

 

 

 

 

 

I would like to show only matched cust_id from two separate tables and sum the total up! Hopefully someone can guide me through this. 

Thank you!

 

1 ACCEPTED SOLUTION
Community Support
Community Support

@beekee,

 

You may use DAX below to add a measure to Customer table.

Measure =
VAR Cust_id =
    MAX ( Customer[Cust_id] )
RETURN
    SUMX (
        FILTER ( Customer_details, Customer_details[Cust_id] = Cust_id ),
        Customer_details[Total]
    )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Community Support
Community Support

@beekee,

 

You may use DAX below to add a measure to Customer table.

Measure =
VAR Cust_id =
    MAX ( Customer[Cust_id] )
RETURN
    SUMX (
        FILTER ( Customer_details, Customer_details[Cust_id] = Cust_id ),
        Customer_details[Total]
    )
Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
secondImage

Happy New Year from Power BI

This is a must watch for a message from Power BI!

December Update

Check it Out!

Click here to read more about the December 2020 Updates!

Community Blog

Check it Out!

Click here to read the latest blog and learn more about contributing to the Power BI blog!

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

Mark your calendars and join us for our next Power BI Dev Camp!.

Top Solution Authors
Top Kudoed Authors