Forum Discussion

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

Equivalent of using LOOKUPVALUE in DirectQuery Mode?

  • DCrowther ,

     

    If the tables in your data model has relationship(one-one, one-many) with each other, you can use RELATED() function on the one side table. Nest the RELATED() function into FILTER(). The DAX expression will be like pattern below:

    Result =
    CALCULATE (
        MAX ( Table1[Value1] ),
        FILTER ( Table1, Table1[Value2] = RELATED ( Table2[Value3] ) )
    )

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

1 Reply

  • v-yuta-msft's avatar
    v-yuta-msft
    Icon for Community Support rankCommunity Support

    DCrowther ,

     

    If the tables in your data model has relationship(one-one, one-many) with each other, you can use RELATED() function on the one side table. Nest the RELATED() function into FILTER(). The DAX expression will be like pattern below:

    Result =
    CALCULATE (
        MAX ( Table1[Value1] ),
        FILTER ( Table1, Table1[Value2] = RELATED ( Table2[Value3] ) )
    )

    Community Support Team _ Jimmy Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.