Forum Discussion
Anonymous
3 years agoNot applicable
Finding Course Instructor name for two particular courses.
Hello Ashish
I have an ORIGINAL TABLE where I have the following columns:
| Student Name | Student ID | Completed Course | Course Completion | Course Instuctor Name |
| John | 1234 | MAT1 | 1 | Dr Yun |
| John | 1234 | MAT 3 | 1 | Dr Paul |
| John | 1234 | ECO 2 | 1 | Dr Man |
| Liz | 7896 | MAT1 | 1 | Dr Yun |
| Liz | 7896 | MAT 3 | 1 | Dr Paul |
| Liz | 7896 | ECO 2 | 1 | Dr Man |
Then I created a "TABLE VISUAL" in Power BI to get the following table where I have used
CONCATENATEX(VALUES....) function to show all the completed courses in 1 row.
But I cannot get the right most two expected columns.
Can anyone kindly assist to get the righmost two columns.
Thanks in advance for your time and consideration.
| Student Name | Student ID | Completed courses | Course Completion | (Expected Column) Course Instructor name for MAT1 | (Expected Column) Course Instructor name for MAT 3 |
| John | 123 | MAT 1, ECO2, MAT3 | 1 | Dr Yun | Dr Paul |
| Adam | 1236 | MAT 1 | 1 | Dr Yun | Course not found |
| Sara | 1125 | ECO 2 | 1 | Course not found | Dr Xuan |
| Liz | 7896 | MAT3 | 1 | Course not found | Dr Paul |
3 Replies
- wdx223_DanielCommunity ChampionCourse Instructor name for MAT1 = COALESCE(CALCULATE(MAX(YourDataTable[Course Instuctor Name]),YourDataTable[Completed Course]="MAT1"),"Course not found")
- AnonymousNot applicable
Hello Daniel,
I used your code, selected the Datatable but I am only getting "Course not found" . I have checked the particular course is present in the course list yet its returning "Course not found".
- AnonymousNot applicable
The solution can be found in my another post