Forum Discussion

cristianml's avatar
cristianml
Icon for Post Prodigy rankPost Prodigy
7 years ago
Solved

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,

 

  • parry2k's avatar
    parry2k
    7 years ago

    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])

3 Replies

  • 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] )

     

    • cristianml's avatar
      cristianml
      Icon for Post Prodigy rankPost Prodigy

      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.

      • parry2k's avatar
        parry2k
        Icon for Super User rankSuper User

        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])