cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Merge two entities

EntityA 

year      month       totalcost

2017     jan              1000

2017     feb              1500

2019     dec              200

 

EntityB

year         month         totalpayment

2017        jan               800

2018        apr               1500

2018        may              900

 

Result should show:

May be in EntityA or EntityB or new entity like EntityC

year      month       totalcost        totalpayment

2017     jan              1000             800

2017     feb              1500             null

2018     apr              null               1500

2018     may             null              900

2019     dec              200              null

 

I have tried with different relationship among entities 1:N, N:1 N:N without success. 

 

Any help greatly appreciated. Thank you. 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Support
Community Support

Re: Merge two entities

Hi @vghanithala ,

Do you want to merge Entity A and Entity B into single one Table?

 

Based on the needs that you mentioned, I think the collection and AddColumns function could achieve your needs. On your side, you could consider take a try with the following formula (set the OnSelect property of a button to following😞

Clearcollect(
       FinalResult,
       AddColumns(
                 EntityA,
                 "totalpayment",
                 If(
                    IsBlank(LookUp(EntityB, year = EntityA[@year] && month = EntityA[@month], totalpayment)),
                    "Null",
                    LookUp(EntityB, year = EntityA[@year] && month = EntityA[@month], totalpayment)
                 )
       )
)

You could then add a Data Table control in your app, set the Items property to following:

FinalResult

then enable the corresponding fields within your Data Table, then you could review the merged result.

 

Best regards, 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
Highlighted
Community Support
Community Support

Re: Merge two entities

Hi @vghanithala ,

Do you want to merge Entity A and Entity B into single one Table?

 

Based on the needs that you mentioned, I think the collection and AddColumns function could achieve your needs. On your side, you could consider take a try with the following formula (set the OnSelect property of a button to following😞

Clearcollect(
       FinalResult,
       AddColumns(
                 EntityA,
                 "totalpayment",
                 If(
                    IsBlank(LookUp(EntityB, year = EntityA[@year] && month = EntityA[@month], totalpayment)),
                    "Null",
                    LookUp(EntityB, year = EntityA[@year] && month = EntityA[@month], totalpayment)
                 )
       )
)

You could then add a Data Table control in your app, set the Items property to following:

FinalResult

then enable the corresponding fields within your Data Table, then you could review the merged result.

 

Best regards, 

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Tech Marathon

Maratón de Soluciones de Negocio Microsoft

Una semana de contenido con +100 sesiones educativas, consultorios, +10 workshops Premium, Hackaton, EXPO, Networking Hall y mucho más!

Users online (5,101)