Forum Discussion

marri's avatar
marri
Frequent Visitor
8 years ago
Solved

related function between three tables

Hi,   I have three tables say A, B and C. Relationship Between tables are follows: Table A has Primarykeys of B and C B to A - One to Many C to A - One to Many   Now I want to derive a column...
  • v-caliao-msft's avatar
    8 years ago

    marri,

     

    If the table relationships are created without problems. You could try the DAX below.

    Table A.calculated col =
    var tableBtitle = RELATED(tableB[title])
    var tableCcode = RELATED(tableC[code])
    return SWITCH(TRUE(),   tableBtitle  = "abc" && tableCcode ="kon", "pi",
    			tableBtitle ="phg" && tableCcode ="poj", "lm",
    			"unknown")

    Regards,

    Charlie Liao