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 Query Inner ...
Power Apps
Unanswered

PowerApps Query Inner Join issue

(0) ShareShare
ReportReport
Posted on by 89

Hi everyone.

 

I have a DataTable1 already connected to Oracle Table using below code in Items:

 

 

'[QA].[Location]'

 

 

 

The problem i have is that i need to do an Inner Join with another table , cause i'm missing some columns.

In another Table called "Addr_t", I have the address components.

 

If i write this down in Oracle, it's as simple as:

 

 

Select a.Id, a.Name, b.Address, b.City, b,Province, b.PostalCode, b.Country 
From Location a 
Inner Join Addr_t b ON b.Addr_id = a.Addr_id And a.Id = '123456'

 

 

 

Now i'm trying to transpose that into PowerApps but without any good results by doing:

 

 

AddColumns(
 '[QA].[Location]',
 "Address", City","Province","PostalCode","Country",
 LookUp(
 '[QA].[Addr_t]',
 Addr_t = '[QA].[Location]'[@Addr_id] And '[QA].[Location]'[@Id] = "123456"
 ).City, Province, PostalCode,Country
)

 

 

 

What exactly am I doing wrong? How can i make this wotk?

 

Thank you for your help

 

 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,991 Moderator on at

    @Wilder1626 

    I've got a great pattern for a RIGHT JOIN which you could use and then FILTER out any blanks to effectively create an INNER JOIN.

     

    JOIN All Columns From Another Collection:

    https://matthewdevaney.com/powerapps-collections-cookbook/join-all-columns-from-another-collection/

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Wilder1626 Profile Picture
    89 on at

    Thanks for your response. I'm new on Powerapps, so i may be slow to understand how to adjust it for my need.

     

    I've got a hard time to understand your Solution code:

    //Create two collections
    ClearCollect(myProduct4,
    {ProductID: "1000", 'ProductName': "Jacket", UnitPrice: 70},
    {ProductID: "1001", 'ProductName': "T-Shirt", UnitPrice: 30},
    {ProductID: "1002", 'ProductName': "Baseball Cap", UnitPrice: 20}
    );
    
    ClearCollect(mySales4,
    {ProductID: "1001", QuantitySold: 4},
    {ProductID: "1002", QuantitySold: 5},
    {ProductID: "1001", QuantitySold: 7},
    {ProductID: "1000", QuantitySold: 1},
    {ProductID: "1000", QuantitySold: 8}
    );
    
    //Add all columns from another table code
    ClearCollect(mySolution4,
     Ungroup(
     DropColumns(
     AddColumns(
     mySales4,
     "myGroupedColumn",
     Filter(
     myProduct4,
     ProductID=mySales4[@ProductID]
     )
     ),
     "ProductID"
     ),
     "myGroupedColumn"
     )
    );
  • Wilder1626 Profile Picture
    89 on at

    OK. After a couple of days, i was able to test a few things but still not working correctly.  I'm only missing the LocationID value. Kind of weird:

     

    ShowColumns(
    AddColumns('[QA].[ADDR_T]',
    "LocationID",
    LookUp('[QA].[Location]',ADDR_ID ='[QA].[ADDR_T]'[@ADDR_ID])),
    "LocationID","Address","City","Province","PostalCode","Country")

     

     

    Can you see what would be the problem? What i need to say is that i have a LocationID in both tables, but i want to have the one from the Location table. Not the one from the address table. It also say in the data field:  LocationID(Custom) / Custom Card...

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 534

#2
WarrenBelz Profile Picture

WarrenBelz 416 Most Valuable Professional

#3
Valantis Profile Picture

Valantis 306

Last 30 days Overall leaderboard