Forum Discussion

srdjanmish's avatar
srdjanmish
Icon for Helper I rankHelper I
7 years ago
Solved

Joining one field from table to another table with through table

Hello everybody.   I am new, so, please, be gentle if I make mistakes, or sound as a beginner :)   My problem is next:   I have 3 tables:   TABLE 1 columns:    acID acRelT3ID .... other c...
  • v-lid-msft's avatar
    v-lid-msft
    7 years ago

    Hi srdjanmish ,

     

    How about add one column contain table name in each t3 table, then union them as one table in the power query editor? Then we can just use the measure as following formula.

     

    DisplayValue =
    VAR tableName =
        LOOKUPVALUE ( T2[relationTableName], T2[acID], MAX ( 'T1'[acID] ) )
    RETURN
        LOOKUPVALUE (
            T3Union[DispalyValue],
            T3Union[TableName], tableName,
            T3[acRelT3ID], MAX ( 'T1'[acRelT3ID] )
        )

    Best regards,

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