Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

using inactive relationship

Hello all, I have a question about how to configure certain relations. I have data like the following: "T1" Lookup table for id code id code 1 a 2 b 3 c 4 d 5 f "T...
  • TomMartens's avatar
    7 years ago

    Hey,

     

    assuming you want to create a calculated column, you can do this by using this DAX statement, just utilize the DAX function LOOKUPVALUE (it's totally independent from relationships):

    code id 2 = 
    LOOKUPVALUE('T1'[code],'T1'[id],'T2'[id_2]) 

    Due to the fact that the usage of USERELATIONSHIP needs a CALCULATE that leads to context transition, and so on and so on. I would not recommend to use USERELATIONSHIP but instead plain vanilla LOOKUPVALUE. The DAX would become much more complex and depending on performance impacts can be neglected, due the fact that this calculation happens just during data refresh and not during query execution.

    Regards,
    Tom