RELATED lookup with text values

colinhahn

New Member
Joined
Jan 4, 2021
Messages
11
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
I am struggling to set up a measure in Excel to look up a text value from a dimension table based on a key in a fact table. I am using Power Query to import tables from a variety of data sources as connections, so there is no literal table in the spreadsheet.

My fact table is CourseCompletions and contains completion data for training courses: the columns include EmployeeID, CourseID, and DateCompleted.

My dimension table is EmployeeData and contains columns like EmployeeID, EmployeeFirstName, EmployeeLastName, and EmployeeEmail.

I have set up a relationship between the tables on EmployeeID. The fact table is on the many side of the relationship, and the dimension table is on the one side.

My goal is to have a pivot table with a list of the EmployeeIDs, a sum of the courses completed for each employee, and the email address for the employee. (It's a little more complicated than that, but that simplified version will illustrate the issue. I will have a VBA routine that loops through the rows of the pivot table and sends an email to each employee with a count of how many courses they have completed, which is why I need the email address).

The measure that I attempted to create is in the fact table, and is =RELATED(EmployeeData[EmployeeEmail]). However, I get the error that the column doesn't exist or doesn't have a relation to any table in the current context. I have double checked that there are no duplicates for EmployeeID in the EmployeeData table, that the EmployeeData table is on the one side of the relationship, and that the relationship is active.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
Welcome to MrExcel Message Board.
Please upload Example file And Desired Result with 10-20 rows with XL2BB ADDIN or upload at free hosting site e.g. www.dropbox.com or OneDrive or GoogleDrive and Insert Link here.
 
Upvote 0

Forum statistics

Threads
1,215,018
Messages
6,122,703
Members
449,093
Latest member
Mnur

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top