Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
mark_carlisle
Advocate IV
Advocate IV

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 NameSurnameFull NameManager NameLogin 1Login 2EmailTeamIs ManagerManagerEmail
1

Fahima

MaddoxFahima MaddoxJodi VaughnFahima.Maddox71328Fahima.Maddox@example.comJodi Vaughn - Team 10 
2

Jemima

MatthamsJemima MatthamsJemima MatthamsJemima.Matthams13576Jemima.Matthams@example.comJemima Matthams - Team 21 
3

Shantelle

HopperShantelle HopperJemima MatthamsShantelle.Hopper71313Shantelle.Hopper@example.comJemima Matthams - Team 20 
4

Catherine

MahoneyCatherine MahoneyJodi VaughnCatherine.Mahoney28973Catherine.Mahoney@example.comJodi Vaughn - Team 10 
5

Winston

AguilarWinston AguilarJemima MatthamsWinston.Aguilar26515Winston.Aguilar@example.comJemima Matthams - Team 20 
6

Jodi

VaughnJodi VaughnJodi VaughnJodi.Vaughn57630Jodi.Vaughn@example.comJodi Vaughn - Team 11 

 

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 NameSurnameFull NameManager NameLogin 1Login 2EmailTeamIs ManagerManagerEmail
1

Fahima

MaddoxFahima MaddoxJodi VaughnFahima.Maddox71328Fahima.Maddox@example.comJodi Vaughn - Team 10Jodi.Vaughn@example.com
2

Jemima

MatthamsJemima MatthamsJemima MatthamsJemima.Matthams13576Jemima.Matthams@example.comJemima Matthams - Team 21Jemima.Matthams@example.com
3

Shantelle

HopperShantelle HopperJemima MatthamsShantelle.Hopper71313Shantelle.Hopper@example.comJemima Matthams - Team 20Jemima.Matthams@example.com
4

Catherine

MahoneyCatherine MahoneyJodi VaughnCatherine.Mahoney28973Catherine.Mahoney@example.comJodi Vaughn - Team 10Jodi.Vaughn@example.com
5

Winston

AguilarWinston AguilarJemima MatthamsWinston.Aguilar26515Winston.Aguilar@example.comJemima Matthams - Team 20Jemima.Matthams@example.com
6

Jodi

VaughnJodi VaughnJodi VaughnJodi.Vaughn57630Jodi.Vaughn@example.comJodi Vaughn - Team 11Jodi.Vaughn@example.com

 

I feel like this should be possible but I just can't think of what I would need to do.

1 ACCEPTED SOLUTION

@mark_carlisle

 

File attached as well

 

loook.png


Regards
Zubair

Please try my custom visuals

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

Hi @mark_carlisle

 

Hopefully this would work

 

Column =
VAR mytable =
    SUMMARIZE ( Table1, [Full Name], [Email] )
VAR mymanager = Table1[Manager Name]
RETURN
    LOOKUPVALUE ( [Email], [Full Name], mymanager )

Regards
Zubair

Please try my custom visuals

@mark_carlisle

 

File attached as well

 

loook.png


Regards
Zubair

Please try my custom visuals

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?

@mark_carlisle,

 

As mentioned here, if multiple rows match the search values and in all cases result_column values are identical then that value is returned. However, if result_column returns different values an error is returned.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.