cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Regular Visitor

New Column based on match of 2 fields in same table

I'm trying to do a match based on 2 criteria from within the same table.

 

e.g.

 

My table looks like: 

 

IDemployeeIDAffilliationAffilliationTypetitleFor
112Internal ServicesDivision 
25Health Care ProtectionUnit 
322ChiefTitleUnit
446Consumer ServicesDivision 
522Education & CommunicationsUnit 
619Human ResourcesDivision 

 

I want to add a column that looks for a match of the employeeID and AffilliationType based on employeeID and titleFor of the record.  The result would be:

 

IDemployeeIDAffilliationAffilliationTypetitleFortitleAffilliation
112Internal ServicesDivision  
25Health Care ProtectionUnit  
322ChiefTitleUnitEducation & Communications
446Consumer ServicesDivision  
522Education & CommunicationsUnit  
619Human ResourcesDivision  

 

Thanks in advance for any help or general direction for this.

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: New Column based on match of 2 fields in same table

You could do this with the DAX LookupValue function

 

eg.

 

= LOOKUPVALUE(Table1[Affilliation], Table1[AffilliationType], Table1[titleFor], Table1[employeeID], Table1[employeeID])

View solution in original post

1 REPLY 1
Highlighted
Super User III
Super User III

Re: New Column based on match of 2 fields in same table

You could do this with the DAX LookupValue function

 

eg.

 

= LOOKUPVALUE(Table1[Affilliation], Table1[AffilliationType], Table1[titleFor], Table1[employeeID], Table1[employeeID])

View solution in original post

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

July 2020 Community Highlights

July 2020 Community Highlights

Learn about the exciting things that happened in July.

Get Ready for Power BI Dev Camp

Get Ready for Power BI Dev Camp

We are thrilled to announce we will begin running a monthly webinar series named Power BI Dev Camp.

Power BI Desktop August 2020 Update

Power BI Desktop August 2020 Update

We have great updates this month! Click the link for the video with more info.

Top Solution Authors
Top Kudoed Authors