Forum Discussion
Lookup a value within a table
I have a table in Power BI which looks similar to below (unable to post the actual table as this contains confidential information). Essentially it collates all of the different logins/user names from all the difference systems used into one table.
| Employee No. | First Name | Surname | Full Name | Manager Name | Login 1 | Login 2 | Team | Is Manager | ManagerEmail | |
| 1 | Fahima | Maddox | Fahima Maddox | Jodi Vaughn | Fahima.Maddox | 71328 | [email protected] | Jodi Vaughn - Team 1 | 0 | |
| 2 | Jemima | Matthams | Jemima Matthams | Jemima Matthams | Jemima.Matthams | 13576 | [email protected] | Jemima Matthams - Team 2 | 1 | |
| 3 | Shantelle | Hopper | Shantelle Hopper | Jemima Matthams | Shantelle.Hopper | 71313 | [email protected] | Jemima Matthams - Team 2 | 0 | |
| 4 | Catherine | Mahoney | Catherine Mahoney | Jodi Vaughn | Catherine.Mahoney | 28973 | [email protected] | Jodi Vaughn - Team 1 | 0 | |
| 5 | Winston | Aguilar | Winston Aguilar | Jemima Matthams | Winston.Aguilar | 26515 | [email protected] | Jemima Matthams - Team 2 | 0 | |
| 6 | Jodi | Vaughn | Jodi Vaughn | Jodi Vaughn | Jodi.Vaughn | 57630 | [email protected] | Jodi Vaughn - Team 1 | 1 |
What I want to be able to do is to lookup the email address of the employees manager and show it in the ManagerEmail column, as below.
| Employee No. | First Name | Surname | Full Name | Manager Name | Login 1 | Login 2 | Team | Is Manager | ManagerEmail | |
| 1 | Fahima | Maddox | Fahima Maddox | Jodi Vaughn | Fahima.Maddox | 71328 | [email protected] | Jodi Vaughn - Team 1 | 0 | [email protected] |
| 2 | Jemima | Matthams | Jemima Matthams | Jemima Matthams | Jemima.Matthams | 13576 | [email protected] | Jemima Matthams - Team 2 | 1 | [email protected] |
| 3 | Shantelle | Hopper | Shantelle Hopper | Jemima Matthams | Shantelle.Hopper | 71313 | [email protected] | Jemima Matthams - Team 2 | 0 | [email protected] |
| 4 | Catherine | Mahoney | Catherine Mahoney | Jodi Vaughn | Catherine.Mahoney | 28973 | [email protected] | Jodi Vaughn - Team 1 | 0 | [email protected] |
| 5 | Winston | Aguilar | Winston Aguilar | Jemima Matthams | Winston.Aguilar | 26515 | [email protected] | Jemima Matthams - Team 2 | 0 | [email protected] |
| 6 | Jodi | Vaughn | Jodi Vaughn | Jodi Vaughn | Jodi.Vaughn | 57630 | [email protected] | Jodi Vaughn - Team 1 | 1 | [email protected] |
I feel like this should be possible but I just can't think of what I would need to do.
4 Replies
- Zubair_MuhammadCommunity Champion
Hopefully this would work
Column = VAR mytable = SUMMARIZE ( Table1, [Full Name], [Email] ) VAR mymanager = Table1[Manager Name] RETURN LOOKUPVALUE ( [Email], [Full Name], mymanager )- Zubair_MuhammadCommunity Champion
- mark_carlisleAdvocate IV
Thanks for this, however I get an error;
A table of multiple values was supplied where a single value was expected.
TeamManagerEmail = VAR mytable=SUMMARIZE('DV_STAFF2:DV_STAFFBY_EMPNO',[FullName],[SageEmailAddress]) VAR mymanager='DV_STAFF2:DV_STAFFBY_EMPNO'[Team Manager] RETURN LOOKUPVALUE([SageEmailAddress],[FullName],mymanager)The only difference between mine and yours is the '' marks around the table name.
Any suggestions?