Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

connect two tables with some common string

Hi all,   I have two tables in power bi: 1: With Projects Names 2: With URL (which includes project names)  For the 2 table there are many different URL's with same project name. I want to some...
  • v-xjiin-msft's avatar
    v-xjiin-msft
    8 years ago

    Hi Anonymous,

     

    To achieve your requirement, you can use SEARCH() function to match two tables. Please refer to following calculated column with DAX expression:

     

    Key Column =
    CALCULATE (
        IF (
            COUNTROWS ( VALUES ( 'Project Names'[Project Names] ) ) > 1,
            "More than 1 Project Names",
            VALUES ( 'Project Names'[Project Names] )
        ),
        FILTER (
            ALL ( 'Project Names'[Project Names] ),
            SEARCH ( 'Project Names'[Project Names], 'URL'[URL], 1, 0 ) <> 0
        )
    )

     

    Thanks,
    Xi Jin.