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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
cristianml
Post Prodigy
Post Prodigy

Lookup Value for 2 columns

Hi,

 

I need to do a Lookupvalue in a new column to find data from 2 columns (Query data) to give me a result from a table I created (Mapping table: Level Type):

 

Query data
Type / Career TrackLevel
Client & Market                         11 - Analyst
Client & Market                         6 - Senior Manager
Client & Market                         Accenture Leadership
Operations            10 - Analyst
Operations            11 - Analyst
Operations            12 - Associate
Operations            13 - Associate
Operations            9 - Consultant
Operations            Accenture Leadership
Corporate 11 - Analyst
Corporate 12 - Associate
Corporate 8 - Consultant
Innovation 5 - Associate Director
Innovation 8 - Consultant
Subcontractor 
Unassigned 

 

mapping table
LevelLevel Type
5 - Associate Director05 - Associate Director
6 - Senior Manager06 - Senior Manager
7 - Manager07 - Manager
8 - Consultant08 - Consultant
9 - Consultant09 - Consultant
10 - Analyst10 - Analyst
11 - Analyst11 - Analyst
12 - Associate12 - Associate
13 - Associate13 - Associate
SubcontractorSubcontractor
UnassignedUnassigned

 

I tried LOOKUPVALUE combined with IF  / IFERROR / OR but I Couldn't find a Logic formula.

 

Thanks,

 

1 ACCEPTED SOLUTION

@cristianml you can surely use lookup if you don't want to create relations and combine the value returned by both lookup in one column.

 

The firest lookup will not any return based on sample data becuase there is no matching row, to combine just do following

 

My Lookup Value = 

LOOKUPVALUE('Map resource Level Type'[Level Type],'Map resource Level Type'[Level],'Resource Actual'[Type / Career Track]) 
&
LOOKUPVALUE('Map resource Level Type'[Level Type],'Map resource Level Type'[Level],'Resource Actual'[Level])


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

View solution in original post

3 REPLIES 3
parry2k
Super User
Super User

@cristianml I guess you want level type in table 1 below from mapping table based on matching value of Level column, correct?

 

Set relatioship between both the tables on Level, in relatioship 1 side will be mapping table and many side will be your data table, and add following column in your data table

 

Level Type = RELATED( MappingTable[LevelType] )

 



Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Hi,

 

What I need is to have in one column the result of these two formulas :

 

LOOKUPVALUE('Map resource Level Type'[Level Type],'Map resource Level Type'[Level],'Resource Actual'[Type / Career Track])
LOOKUPVALUE('Map resource Level Type'[Level Type],'Map resource Level Type'[Level],'Resource Actual'[Level])

 

Without making any relationship. Is possible ?

 

Thanks.

@cristianml you can surely use lookup if you don't want to create relations and combine the value returned by both lookup in one column.

 

The firest lookup will not any return based on sample data becuase there is no matching row, to combine just do following

 

My Lookup Value = 

LOOKUPVALUE('Map resource Level Type'[Level Type],'Map resource Level Type'[Level],'Resource Actual'[Type / Career Track]) 
&
LOOKUPVALUE('Map resource Level Type'[Level Type],'Map resource Level Type'[Level],'Resource Actual'[Level])


Subscribe to the @PowerBIHowTo YT channel for an upcoming video on List and Record functions in Power Query!!

Learn Power BI and Fabric - subscribe to our YT channel - Click here: @PowerBIHowTo

If my solution proved useful, I'd be delighted to receive Kudos. When you put effort into asking a question, it's equally thoughtful to acknowledge and give Kudos to the individual who helped you solve the problem. It's a small gesture that shows appreciation and encouragement! ❤


Did I answer your question? Mark my post as a solution. Proud to be a Super User! Appreciate your Kudos 🙂
Feel free to email me with any of your BI needs.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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