Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Multiple Column Match and Lookupvalue

I have two table, Table1 has a list of employees and Table2 has a list of courses completed by each employee as shown below. Table1 Employee List Employee A Employee B Employee C Emp...
  • az38's avatar
    6 years ago

    Hi Anonymous 

    try to create a new calculated table

     

    LastCourseTable = SUMMARIZE(
    Table2, Table2[Employee], Table2[Course Name],
    "Last Date", MAX(Table2[Course Date])
    )

     

    then create a relationship Table1 - LastCourseTable 

    by Employee coulmn

    then create a matrix visual with:

    Rows - Table1[Employee List] (set Showitems with no data) in row parameter

    Columns - LastCourseTable[Course Name]

    Values -  LastCourseTable[Last Date]

     

    do not hesitate to give a kudo to useful posts and mark solutions as solution

    LinkedIn

  • TheDataMustFlow's avatar
    6 years ago

    You don't really need to create a measure to obtain the desired result.

     

    All you need is to create a relationship between table 1 and table 2 on the employee columns, create a matrix visual with:

    Rows: Table 1 Employee List

    Columns: Table 2 Course Name

    Values: Course Date

     

    Then you need to select Latest for the values:

     

     

    Alternatively, you can create a measure to calculate the latest date: Latest Date = Max(Table2[Course Date]) and put it in values instead

     

    then, select Show items with no data for the rows:

     

     

     and then, remove the subtotals:

     

     

    the end result should be something like this:

     

     

    I suggest that you create a table just for the courses list and link it to Table 2 so that your matrix can also show courses not completed by any employee.

     

    I hope this helps.