Skip to main content

Notifications

Power Apps - Power Query
Answered

Join two lists in a collection

(0) ShareShare
ReportReport
Posted on by 227
Hi,
 
Below are two SharePoint list structures.
 
ID Name
A1 ABC
A2 ABCD
and 
Name Account Amount
     
 
I need a query to join these two lists in a collection so that the output is like 
Name Account Amount ID
ABC     A1
ABCD     A2
 
Regards
Categories:
  • Verified answer
    jpespena Profile Picture
    jpespena 335 on at
    Join two lists in a collection
    Hi,
     
    Use this code:
     
    ForAll(
       SharepointList1 As List1,
       Collect(
          colCombinedList,
          {
             Name: List1.Name,
             Account: LookUp(SharepointList2, Name = List1.Name).Account,
             Amount: LookUp(SharepointList2, Name = List1.Name).Amount,
             ID: List1.ID
           }
       )
    )
     

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Kickstarter Events…

Register for Microsoft Kickstarter Events…

Tuesday Tip #12 Start your Super User…

Welcome to a brand new series, Tuesday Tips…

Tuesday Tip #13 Writing Effective Answers…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 144,858

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,505

Leaderboard

Featured topics