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 / 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,145 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,991 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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 530

#2
WarrenBelz Profile Picture

WarrenBelz 459 Most Valuable Professional

#3
Haque Profile Picture

Haque 314

Last 30 days Overall leaderboard