Forum Discussion

Rushil_15's avatar
Rushil_15
Frequent Visitor
2 years ago
Solved

Need Help on Matching columns from Different Tables

Hello, So I am trying to get a column that shows if the reason in two columns both in different tables matches or not. I did many to many relationships using the IDs. Below is an example of two tabl...
  • speedramps's avatar
    2 years ago

    Try this solution ..
    https://1drv.ms/u/s!AgMTUY3Uvq3bg8glg-ytnTIQ5iTN9Q?e=CGYbXv

    How it works ....
    Add a "Table" column = 1 to Table1
    Add a "Table" column = 2 to Table2
    Append Table1 and Table2 to new Table3

     

    In Table3 Split Column by Delimter 
    with Comma,  Each occurence, Advanced and Rows

     

    Create measures

    Reasons =
    CALCULATE(
        CONCATENATEX(
            DISTINCT(Table3[Reason]),
            Table3[Reason],
            ", "))
    Answer =
    SWITCH(TRUE(),
    [Reasons] = BLANK(),"N/A",
    COUNTROWS(Table3) > DISTINCTCOUNT(Table3[Reason]),"Yes",
    "No")

    The on a new page, drag a table visual, and drag Tabl3 ID, the Reasons measure and the Answer measure
     

     

    Thanks for the clear description of the problem with example data. I wish everyone did that!

     

    Remember we are unpaid volunteers. So please click the thumbs up and the accept as solution button to leave kudos. 

     

    If you give someone a fish then you only give them one meal, but if you teach them how to fish then they can feed themselves and teach others for a lifetime.  This is how I try answer Power BI and DAX questions with clear examples so your can learn techniques.

     

    One question per ticket please. If you need to extend your request then please raise a new ticket.

     

    You will get a quicker response and each volunteer solver will get the kudos they deserve. Thank you ! 

     

    If you quote @speedramos in your next tickers then I will then receive an automatic notification, and will be delighted to help you again.

     

    Please click the thumbs up and the accept as solution button.