I am working in Power Query with normalized tables in Power BI, and need to manipulate a table in order to create a many-to-one relationship to another table. Consider the following example. I have a table with the columns "Employee ID", "Metric", and "Value". Each employee ID has the "Metrics" Name, Gender, Age, Department, and Experience. Currently, the table is structured so that each Employee ID is repeated 5 times, one for each metric, and has a value for each in the "Value" column.
I need to pivot the data so that each unique Employee ID has a row, with separate columns for each metric, and the Values in the corresponding cells. Each employee ID will have a row, and the columns will be "Name", "Gender", "Age", "Department", and "Experience". Is there an easy way to do this in Power Query in Power BI?
I tried a pivot, and this creates the columns as desired, but still repeats the Employee IDs. For example, each employee will be listed in a row, and the "Name" column will be filled. All of the employee IDs will be listed a second time in the "Employee ID" column, but now the "Name" column will be blank, and only "Gender" will be populated. And this continues for all metrics
Any help is much appreciated. Let me know if you have any questions.