Forum Discussion

hassanh_2's avatar
hassanh_2
New Member
3 years ago
Solved

DAX Function to Create a Column Based on condition / filter in another column

Hello, Im trying to create a new column that returns a value from another table based on condition / filter.   As you see I have the following 2 tables. I want to create a new column in Table 2, i...
  • tamerj1's avatar
    3 years ago

    Hi hassanh_2 
    Please try

    NewColumn =
    MAXX (
        TOPN (
            1,
            CALCULATETABLE ( Table2, USERELATIONSHIP ( Table1[Acct Nr], Table2[Acct Nr] ) ),
            Table2[Log_ID], ASC
        ),
        Table2[Sales Person]
    )