Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Daryl_K
Resolver II
Resolver II

Match row in one source to that in another

I have a Power BI report that pulls data from two SharePoint lists. Each list has different data for the same projects, but order, date, etc. will not be the same. Similarly, they may be entered at different times, so Table A may have an entry for Project 1 that doesn't exist in Table B, and vice versa.

 

Both lists have hundreds of columns and thousands of rows, but there are three specific columns that I think (combined) can identify a project match, so what I am looking for is some DAX in Table A that will look through Table B, and if (for example):

 

Table A, Row 1, Column 1 = Table B, Row 8,  Column 1,

AND

Table A, Row 1, Column 2 = Table B, Row 8, Column 2

AND

Table A, Row 1, Column 3 = Table B, Row 8, Column 3

 

...then I extract a few select columns from the matching Table B row 8 over to matching Table A row for the needed functions.

 

Is this possible in Power BI and DAX?

1 ACCEPTED SOLUTION
v-yiruan-msft
Community Support
Community Support

Hi @Daryl_K ,

Do you want to merge Table A and Table B base on the field project, order and date? If yes, you can refer the content in the following links to achieve it.

Join Datasets with multiple columns conditions in Power BI

Join tables based on multiple columns

If you only want to get the aggregated values of table A/B base on table B/A, you can refer the content in the following thread to get it.

Multiple columns join/goup

For example: get the sum of values in Table B base on matched info in Table A

Sum of Values =
CALCULATE (
    SUM ( 'Table B'[xxvalue] ),
    FILTER (
        ALLSELECTED ( 'Table B' ),
        'Table B'[Project] = SELECTEDVALUE ( 'Table A'[Project] )
            && 'Table B'[Order] = SELECTEDVALUE ( 'Table A'[Order] )
            && 'Table B'[Date] = SELECTEDVALUE ( 'Table A'[Date] )
    )
)

Best Regards

Community Support Team _ Rena
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

2 REPLIES 2
v-yiruan-msft
Community Support
Community Support

Hi @Daryl_K ,

Do you want to merge Table A and Table B base on the field project, order and date? If yes, you can refer the content in the following links to achieve it.

Join Datasets with multiple columns conditions in Power BI

Join tables based on multiple columns

If you only want to get the aggregated values of table A/B base on table B/A, you can refer the content in the following thread to get it.

Multiple columns join/goup

For example: get the sum of values in Table B base on matched info in Table A

Sum of Values =
CALCULATE (
    SUM ( 'Table B'[xxvalue] ),
    FILTER (
        ALLSELECTED ( 'Table B' ),
        'Table B'[Project] = SELECTEDVALUE ( 'Table A'[Project] )
            && 'Table B'[Order] = SELECTEDVALUE ( 'Table A'[Order] )
            && 'Table B'[Date] = SELECTEDVALUE ( 'Table A'[Date] )
    )
)

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PaulDBrown
Community Champion
Community Champion

https://community.powerbi.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447523#M6071... 

 

Please follow the recommendations in this thread:

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.