web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Performing Inner Join ...
Power Apps
Answered

Performing Inner Join on Two Collections

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Hello all, I am currently following along to Power Apps - Joining Collections - SQL (Inner) Join - YouTube in order to perform an inner join on two collections I have in my PowerApp.

 

The two collections I am attempting to perform this on are the resourcesColl collection and the orderIds collection. In the resourcesColl collection, there is an "Id" column which matches/maps to the "WorkCenterID" column in the orderIds collection.

 

Here is my formula/code:

innerJoinError.PNG

 

I am getting two errors:

1) The function 'Ungroup' has some invalid arguments

2) A column named 'CreatedBy' already exists (I am pretty sure this one is just being thrown because of the 1st error. I am not actually creating a column called 'CreatedBy' in this code)

 

Where am I going wrong?

Let me know if you need any further information.

 

Regards,

Zachary

Categories:
  • Verified answer
    v-bofeng-msft Profile Picture
    Microsoft Employee on at

    Hi @Anonymous ,

     

    I assume there are two tables:

    ClearCollect(resourcesColl,{Id:"1",Column1:"1"},{Id:"2",Column1:"2"});
    ClearCollect(orderIds,{WorkCenterID:"2",Column2:"1"},{WorkCenterID:"3",Column2:"2"});

    You could use this formula to do the inner join:

    ClearCollect(nameWithPoID,
     ForAll(
     Filter(resourcesColl,Id in orderIds.WorkCenterID) As TableA,
     Patch(LookUp(resourcesColl,Id=TableA.Id),LookUp(orderIds,WorkCenterID=TableA.Id))
     )
    )

     

    Best Regards,
    Bof

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Great, that creates a new collection but only populates the "Id" and "WorkCenterID" columns in the nameWithPoID collection. How would I get this to populate two more columns in the collection? The column names I also wish populated are "Name" from resourcesColl and "ProcessOrderID" from orderIds collection

  • akshaykhanna199 Profile Picture
    2 on at

    This does not work at all. It generates wrong results and also does not exceed the rows in the left table

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 234 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 207 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 169

Last 30 days Overall leaderboard