Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
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 |
Employee D |
Employee E |
Employee F |
Table2
Employee | Course Name | Course Date |
Employee A | Course 1 | 01-02-20 |
Employee A | Course 2 | 02-02-20 |
Employee A | Course 3 | 03-02-20 |
Employee A | Course 3 | 04-02-20 |
Employee A | Course 3 | 05-02-20 |
Employee B | Course 1 | 12-01-20 |
Employee B | Course 2 | 13-01-20 |
Employee B | Course 3 | 14-01-20 |
Employee B | Course 2 | 15-01-20 |
Employee C | Course 1 | 17-01-20 |
Employee C | Course 2 | 18-01-20 |
Employee C | Course 3 | 19-01-20 |
Employee D | Course 1 | 05-01-20 |
Employee D | Course 2 | 06-01-20 |
Employee D | Course 3 | 07-01-20 |
I want to see the latest course date by each course for each employee and blank if a employee dont have a record, something that results like below. Please help.
Employee List | Course 1 | Course 2 | Course 3 |
Employee A | 01-02-20 | 02-02-20 | 05-02-20 |
Employee B | 12-01-20 | 15-01-20 | 14-01-20 |
Employee C | 17-01-20 | 18-01-20 | 19-01-20 |
Employee D | 05-01-20 | 06-01-20 | 07-01-20 |
Employee E | |||
Employee F |
Solved! Go to Solution.
Hi @KiranR
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
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.
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.
Hi @KiranR
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
Hi, thanks for providing me with a solution.
Is there a way to create a new table similar to visual matrix?
Thanks
To clarify, you are looking to create a data table that will have the same information as the matrix visual?
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
41 | |
21 | |
21 | |
14 | |
13 |
User | Count |
---|---|
44 | |
32 | |
30 | |
18 | |
17 |