Forum Discussion

Samikshadixit's avatar
Samikshadixit
New Member
4 years ago
Solved

Match

I have two tables and both have uniques key based on the key I wanted to get customer name for the accounts, one account has multiple customer name ,i want that based on key match i get all the customer name for each account and if key dosent match than return blank

  • ryan_mayu's avatar
    ryan_mayu
    4 years ago

    Samikshadixit 

    pls review the tutorial I provided. You can use Merge function in PQ to get the expected result

     

4 Replies

  • Samikshadixit ,The information you have provided is not making the problem clear to me. Can you please explain with an example.

    Appreciate your Kudos.

    • Samikshadixit's avatar
      Samikshadixit
      New Member
        Main Table  
      Account IDAccount NameCountryKey (AccountID& Country)Customer Name
      12PinkUnitedState12UnitedState 
      16BlueCanada16Canada 
      19GreenSingapore19Singapore 
      42YellowMalaysia42Malaysia 
      78OrangeIndia78India 
      Seconed Table
      Account IDAccount NameCountryKey (AccountID& Country)Customer Name
      12PinkUnitedState12UnitedStateDILIP
      12PinkUnitedState12UnitedStateSheyansh
      12PinkUnitedState12UnitedStateAmit
      16BlueCanada16CanadaRam
      16BlueCanada16CanadaGaurav
      16BlueCanada16CanadaShipra
      19GreenSingapore19SingaporeDeepak
      19GreenSingapore19Singapore

      Shibu

       

        Result Table  
      Account IDAccount NameCountryKey (AccountID& Country)Customer Name
      12PinkUnitedState12UnitedStateDILIP
      12PinkUnitedState12UnitedStateSheyansh
      12PinkUnitedState12UnitedStateAmit
      16BlueCanada16CanadaRam
      16BlueCanada16CanadaGaurav
      16BlueCanada16CanadaShipra
      19GreenSingapore19SingaporeDeepak
      19GreenSingapore19SingaporeShibu
      42YellowMalaysia42MalaysiaBlank
      78OrangeIndia78IndiaBlank

       

      • ryan_mayu's avatar
        ryan_mayu
        Super User

        Samikshadixit 

        pls review the tutorial I provided. You can use Merge function in PQ to get the expected result