Forum Discussion

rjose's avatar
rjose
Frequent Visitor
4 years ago
Solved

Get a column from another table

Hi, I do have 2 tables with many to many relationship in my data model (connected using bridge table that is, a table containing unique values of column 'Category'). I want to get column 'Segment' f...
  • Samarth_18's avatar
    4 years ago

    HI rjose ,

     

    Create a column like below:-

     

    Column =
    CALCULATE (
        MAX ( _Table2[Segment] ),
        FILTER (
            ALL ( _Table2 ),
            [Category] = _Table1[Category]
                && ( [Value] > _Table2[Min]
                && [Value] <= _Table2[Max] )
        )
    )

     

     

    Output:-

     

    Note:- Please share the expected output if this is not matching with your expected output. 🙂

     

    Thanks,

    Samarth