Forum Discussion

kennyyip's avatar
kennyyip
Icon for Helper I rankHelper I
8 years ago
Solved

vlookup and return text

Hi,

 

I have two tables, one is raw data table ("Deal") and the other  table "Customer" is created by summarizing the table "Deal" using the key "customer name" (which is also text). Each customer is assigned an industry (which is in text) in table "Deal". Is it possible to perform like vlookup in excel so I can assign back the industry to the table "Customer"?

 

Regards,

Kenny

  • kennyyip,

     

    You may refer to the DAX below.

    Column =
    LOOKUPVALUE ( Deal[industry], Deal[customer name], Customer[customer name] )
    
    Table =
    SUMMARIZE ( Deal, Deal[customer name], Deal[industry] )
    

5 Replies

  • Phil_Seamark's avatar
    Phil_Seamark
    Icon for Microsoft Employee rankMicrosoft Employee

    HI kennyyip

     

    Are you able to create a relationship between these two tables?

     

    If you can, then you can easily create a calculated measure to bring the text over.  If not there are several ways in DAX to get the data you need.

    • kennyyip's avatar
      kennyyip
      Icon for Helper I rankHelper I

      Yes they are related. Would you mind suggesting what measures to use to bring the text over?

       

      and if they are not related. what DAX formula can i use?

      • Phil_Seamark's avatar
        Phil_Seamark
        Icon for Microsoft Employee rankMicrosoft Employee

        When you say you create the Customer table by Summarizing the Deal table, how do you do this?  Do you do it in Power Query, as a calculated table or other?