cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Mickell2030
Advocate I
Advocate I

Syntax for joining tables

I am having a heck of a time trying to understand the syntax of powerapps.

 

I have a background in SQL and I am very comfortable with it. This is not SQL :(.

 

I have an SQL database. My SQL database was built correctly, with the min amount of repeating data. It seems like Powerapps wants me to have 1 giant table with everything on it instead of multiple tables that are related and joined.

 

Here is what I need to understand:

 

Example - I have 3 tables with information I need from each in a gallery.

 

Table 1 - UPC_Details

Columns (UID) UPC_ID, Brand_ID, Cost, Created_Date

 

Table 2 - Brand_ID

Coulmns (need to join to UPC_Details Brand_ID) (UID) Brand_ID, Brand_Name, Company_Contact_ID...

 

Table 3 - UPC_received

Columns (UID) UPC_Received_ID, (need to join to table UPC_Details so users know what item they are looking at when the UPC is scanned) UPC_ID, Cases_received, Date_received...

 

 

I am sure you can see where this is going.

I need my users to be able to see specific data that I normally would use a join to reference. I do not know if I should be building a collection onvisble, or something else entire. Nor do I undertand the syntax Powerapps uses. I am extremely dissapointed with the resources for Powerapps, as I do not feel these questions are well answered and I am sure I am not the only user with this problem.

 

Thank you in advance to anyone willing to help me out with this.

15 REPLIES 15
Delid4ve
Impactful Individual
Impactful Individual

I hardly ever use lookup.
First(Filter(Table,Expression)).Column
Or
Last(Filter(Table,Expression)).Column
You can also add a sortbycolumns in there if you want say the first date column etc
It’s faster than lookup aswell
Anonymous
Not applicable

Hi All,  I'm working on a similar issue.  I am trying to join two data sources together using the card number in both tables to show which loyalty program name that card number is associated to.  I have been using filter and the lookup function but I'm still having no luck.  I am trying to display the field "loyaltyprogramname" in a label box.

 

Below are the two tables.

 

RetailLoyaltycards: Card Number

RetailLoyaltyCardTiers: Card Number , Loyalty Program Name 

 

Any help would be greatly appreciated!

Anonymous
Not applicable

I have used the expression to populate the Data Table and I am successful in doing it for 2 tables ( 1 Main Table and 1 Look u Table). There is one more column in main table which i want to lookup in another secondary table.

 

How to do that? Pls guide.

Ben-M
New Member

You can create a View in SQL and use that view in PowerApps as a data source just like you use SQL Tables.

@CarlosFigueira Same scenario in my case, I want 2 field from 2 MSD365 F&O Table. 

 

Where I add this formula? Can I add this on form Item property? Or It's Just only for DataTable control.

 

Thanks in advance!

 

Bansari Pandya.

abhishja
Frequent Visitor

hi,

 

How about Right Table in Join?  I am able use Left Table in Join. However I am using Addcolumns(filter (Table1, XXX = "XXX"), "ZZZ", Lookup(Table2, ID= Table1[@ID]).

 

Regards,

Abhishek

 

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Did you miss the call? Check out the recording here!

Top Solution Authors
Top Kudoed Authors
Users online (21,165)