Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Fetch the values from another table by matching column x with eith column A or B in the other table

Hello  I need the values from table 1 by matching column x in table 1 with either column a or column b in table 2. I tried to establish two relationships with table 1 to table 2 but I can only ma...
  • jdbuchanan71's avatar
    4 years ago

    That would be someting like this.

    Values = 
    CALCULATE (
        SUM ( 'Table 2'[Values] ),
        FILTER (
            ALL ( 'Table 2'[ENPNSC_] ),
            'Table 2'[ENPNSC_] = 'Table 1'[Enpnsc_Calculated]
        )
    ) + 
    CALCULATE (
        SUM ( 'Table 2'[Values] ),
        FILTER (
            ALL ( 'Table 2'[ENPNSC_] ),
            'Table 2'[ENPNSC_] = 'Table 1'[Pcsc_calcualted]
        )
    )