cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper III
Helper III

Combining two tables with variance

Hi there, 

 

I am reaching out again in this forum if anybody can figure out how to combine this two tables. I'm out of ideas in my mind. 

I need a summary of what has been requested vs what has been received. I need to display it using data table in powerapps if possible. Please Help. 

 

Thanks in advance.

 

 

MainrequestTable 

LocationNumberLocationNameModelQty
1111Austin LocationIphoneX3
1111Austin LocationSamsung4
2222Michican LocationNokia5

 

ReceivedTable

recLocationNumberrecLocationrecModelreceivedqty
1111Austin LocationIphoneX2
1111Austin LocationSamsung2
2222Michican LocationNokia3

 

is there a way to combine these two tables? like joining them. using data table in powerapps?

like the below summary?

Location NumberLocation NameModelRequested QtyReceived QtyVariance
1111Austin LocationIphoneX321
1111Austin LocationSamsung422
2222Michican LocationNokia532

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Super User III
Super User III

HI @echodapogi ,'

This will only work properly if your Received Table items numbers in under your Delegation limit as relational lookups are not Delegable, but try this

With(
   {wReceived:ReceivedTable},
   RenameColumns(
      AddColumns(
         MainRequestTable,
         "ReceivedQty",
         Lookup(
            wReceived,
            recLocationNumber = LocationNumber
         ).receivedqty,
         "Variance",
         Qty - 
         Lookup(
            wReceived,
            recLocationNumber = LocationNumber
         ).receivedqty
      ),
	  "qty",
	  "Requested Qty"
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

5 REPLIES 5
Super User III
Super User III

HI @echodapogi ,'

This will only work properly if your Received Table items numbers in under your Delegation limit as relational lookups are not Delegable, but try this

With(
   {wReceived:ReceivedTable},
   RenameColumns(
      AddColumns(
         MainRequestTable,
         "ReceivedQty",
         Lookup(
            wReceived,
            recLocationNumber = LocationNumber
         ).receivedqty,
         "Variance",
         Qty - 
         Lookup(
            wReceived,
            recLocationNumber = LocationNumber
         ).receivedqty
      ),
	  "qty",
	  "Requested Qty"
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

 

View solution in original post

hi warrenbelz, thank you for you reply. where i need to put this code? is the datatable items property?

Hi Warren, i figured it out how to make it work from your code. one more question is there a way to add filter on this? like filter by Location Number?

just want to say THANK YOU WARREN. it helps a lot. 

Hi @echodapogi ,

As an example if you had a Text Box called txtLocationNo, you would do this

With(
   {wReceived:ReceivedTable},
   RenameColumns(
      AddColumns(
         Filter(
            MainRequestTable,
            IsBlank(txtLocationNo) || StartsWith('Location Number',txtLocationNo.Text)
         ),
         "ReceivedQty",
         Lookup(
            wReceived,
            recLocationNumber = LocationNumber
         ).receivedqty,
         "Variance",
         Qty - 
         Lookup(
            wReceived,
            recLocationNumber = LocationNumber
         ).receivedqty
      ),
	  "qty",
	  "Requested Qty"
   )
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Helpful resources

Announcements
New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

Top Solution Authors
Top Kudoed Authors
Users online (66,001)