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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / powerapps Joining tabl...
Power Apps
Answered

powerapps Joining tables with multiple records

(1) ShareShare
ReportReport
Posted on by 5

Hi, I am trying to join 2 tables in powerapps and trying to get the true inner join data. below is my sample data -

 

suppose user placed an order with multiple products, I want to join 1 record from Order with Multiple records from product table.

 

Table Orders -

 

OrderID, OrderDate

1, 2018-01-21

2, 2017-01-31

 

Table products -

ProductName, orderID

ABC, 1

CDE, 1

SDW,1

LOJ,2

 

Final Result -

 

Order ID, OrderDate, ProductName

1,2018-01-21,ABC

1,2018-01-21,CDE

1,2018-01-21,SDW

2, 2017-01-31, LOJ

 

I tried Addcolumns using lookup but it only brings one value, is it possible in powerapps or do I need to go to View route?

 

Thanks in Advance

Categories:
I have the same question (0)
  • RezaDorrani Profile Picture
    12,143 on at

    Hi @Anchal_D 

     

    AddColumns(ProductsTable,"OrderDate",LookUp(OrdersTable,OrderID=orderID).OrderDate)

     

    where ProductsTable = name of products table

    OrdersTable = name of orders table

    OrderID = column in orders table

    orderID = column in products table

    OrderDate = column in orders table

     

    Regards,

    Reza Dorrani

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

  • mdevaney Profile Picture
    29,989 Moderator on at

    From what I can tell the relationship between your tables is one order with many different products. If this is the case could do a left table join instead of an inner join (products -> orders).

    ClearCollect(myJoinedData,
    AddColumns(Products,"OrderDate",LookUp(Orders,OrderId=Products[@OrderId],OrderDate)))

     

    The resulting table will look like this...

     

    img3.png


    —
    Please Accept as Solution if this post answered your question so others can find it more quickly. If you found this post helpful consider giving it a Thumbs Up.

  • Verified answer
    v-xida-msft Profile Picture
    on at

    Hi @Anchal_D ,

    Do you want to join the Orders Table and Products Table based on Order ID value?

    Could you please share a bit more about the AddColumns formula you used in your app?

     

    I have made a test on my side, please consider take a try with the following workaround:

    Add a Data Table control within your app, set the Items property to following:

    AddColumns(
     ProductsTable, /* <-- Type ProductsTable here rather than Orders Table */
     "OrderDate",
     LookUp(OrdersTable, OrderID = ProductsTable[@orderID], OrderDate)
    )

    then enable corresponding columns within the Data Table control.

     

    More details about the Disambiguation operator (@) in PowerApps, please check the following article:

    https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/operators#disambiguation-operator

     

    Best regards,

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard