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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
ovetteabejuela
Impactful Individual
Impactful Individual

DAX: Return the Corresponding Name

Sorry a DAX newbie question,

 

Funny but in MySQL this is a piece of cake but with DAX I'm fumbling for a soultion.

 

I have two tables namely an employee heirarchy and the main employee database

 

I simply wanted to basically convert the ID's in the Employee Heirarchy table into real names, the Primary Key Employee ID is a easy one because of the relationship between the Heirarchy and the Main Employee Database but I am stuck on the Supervisor ID. My idea was to do a New Column with a formula, I already did RELATED, RELATEDTABLE with FILTERS but I'm getting an error could you please help me with the correct syntaxt to achieve this?

 

Output Desired:

Employee NameSupervisor Name
Gattuso, BuenaLuper, Stacey
Dorrington, BerryLuper, Stacey
Mclure, LenaLuper, Stacey
Laurion, ChangLuper, Stacey
Reppe, MaragaretLuper, Stacey
Hovland, MerrileeLuper, Stacey
Iman, CaryLuper, Stacey
Grimmett, AikoLuper, Stacey
Shader, KourtneyLuper, Stacey
Wamack, JoycelynLuper, Stacey
Babine, SalleyMcnutt, Eliana
Gaiser, DixieMcnutt, Eliana
Resureccion, BeulaMcnutt, Eliana
Sereno, SigneMcnutt, Eliana
Wooster, CharleneMcnutt, Eliana
Lamango, MarciaMcnutt, Eliana
Byington, RosauraMcnutt, Eliana
Dorosh, TifanyMcnutt, Eliana
Blakeley, AudrieMcnutt, Eliana
Ajose, HermineMcnutt, Eliana

 

 

Employee Heirarchy

Employee IDSupervisor ID
777444546881
516336546881
280658546881
548395546881
907842546881
264933546881
273334546881
383585546881
249598546881
182419546881
609877638013
759223638013
734526638013
262795638013
959846638013
178647638013
456596638013
600668638013
230856638013
614484638013

 

 

Complete Employee Table (Fictional Names)

Employee IDLast NameFirst NameFull NameRole
546881LuperStaceyLuper, StaceySupervisor
638013McnuttElianaMcnutt, ElianaSupervisor
777444GattusoBuenaGattuso, BuenaRand & File
516336DorringtonBerryDorrington, BerryRand & File
280658MclureLenaMclure, LenaRand & File
548395LaurionChangLaurion, ChangRand & File
907842ReppeMaragaretReppe, MaragaretRand & File
264933HovlandMerrileeHovland, MerrileeRand & File
273334ImanCaryIman, CaryRand & File
383585GrimmettAikoGrimmett, AikoRand & File
249598ShaderKourtneyShader, KourtneyRand & File
182419WamackJoycelynWamack, JoycelynRand & File
609877BabineSalleyBabine, SalleyRand & File
759223GaiserDixieGaiser, DixieRand & File
734526ResureccionBeulaResureccion, BeulaRand & File
262795SerenoSigneSereno, SigneRand & File
959846WoosterCharleneWooster, CharleneRand & File
178647LamangoMarciaLamango, MarciaRand & File
456596ByingtonRosauraByington, RosauraRand & File
600668DoroshTifanyDorosh, TifanyRand & File
230856BlakeleyAudrieBlakeley, AudrieRand & File
614484AjoseHermineAjose, HermineRand & File
1 ACCEPTED SOLUTION
hohlick
Continued Contributor
Continued Contributor

Hi

Try this for calculated column:

=LOOKUPVALUE(Employees[Full Name],Employees[Employee ID],[Supervisor ID])

 

Maxim Zelensky
excel-inside.pro

View solution in original post

1 REPLY 1
hohlick
Continued Contributor
Continued Contributor

Hi

Try this for calculated column:

=LOOKUPVALUE(Employees[Full Name],Employees[Employee ID],[Supervisor ID])

 

Maxim Zelensky
excel-inside.pro

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Top Kudoed Authors