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 / How to aggregate two d...
Power Apps
Answered

How to aggregate two data sources into one Data table?

(0) ShareShare
ReportReport
Posted on by 628

I have 2 SharePoint lists, 1 camelCase column can create parity between the two.

 

SharePoint List #1 = 'ESN Ticket Tracker' (Contains most of what I want)

SharePoint List #2 = 'Networking Device List Master' (Contains the rest of what I want such as City, and State)

 

How do I aggregate these together using a Data table?

 

 Currently I am applying some filtering as seen by the screenshots. If this can somehow be done in SharePoint at the source or with Power Automate I am open to that as well.

Screenshot 2021-02-03 105947.pngScreenshot 2021-02-03 105940.png

Categories:
I have the same question (0)
  • eka24 Profile Picture
    20,923 on at

    You can on the items property of the Datatable put:

    AddColumns(
     'ESN Ticket Tracker',
     "city2",
     LookUp(
     'Networking Device List Master' ,
     camelCase = 'ESN Ticket Tracker'[@camelCase],
     city
     ),
     "State2",
     LookUp(
     'Networking Device List Master' ,
     camelCase = 'ESN Ticket Tracker'[@camelCase],
     state
     )
    )

     

    Or

    create a collection OnVisible or OnStart of the App as :

    ClearCollect(MyCombinedTable,
    AddColumns(
     'ESN Ticket Tracker',
     "city2",
     LookUp(
     'Networking Device List Master' ,
     camelCase = 'ESN Ticket Tracker'[@camelCase],
     city
     ),
     "State2",
     LookUp(
     'Networking Device List Master' ,
     camelCase = 'ESN Ticket Tracker'[@camelCase],
     state
     )
    ))

     

    Then use the Collection, MyCombinedTable  on the Items property of the DataTable

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

     

  • dlprentice Profile Picture
    628 on at

    THANK YOU

     

    I had to tweak things a little, but this is working 🙂

     

    For example 'DNS Entity Name' is the name of the column on SharePoint List 2 that I'd like to match up with 'Service ID' on the current data table.

     

    Final code:

     

    AddColumns(
     'ESN Ticket Tracker',
     "City",
     LookUp(
     'Networking Device List Master',
     'DNS Entity Name' = 'ESN Ticket Tracker'[@'Service ID'],
     City
     ),
     "State",
     LookUp(
     'Networking Device List Master',
     'DNS Entity Name' = 'ESN Ticket Tracker'[@'Service ID'],
     State
     )
    )

     
    One last bit of help if you don't mind...
    How do incorporate the following in the above code?

    Filter('ESN Ticket Tracker',Status=StatusDropdown.SelectedText.Value)

     

  • Verified answer
    eka24 Profile Picture
    20,923 on at

    Use this;

    Filter (

    AddColumns( 'ESN Ticket Tracker', "City", LookUp( 'Networking Device List Master', 'DNS Entity Name' = 'ESN Ticket Tracker'[@'Service ID'], City ), "State", LookUp( 'Networking Device List Master', 'DNS Entity Name' = 'ESN Ticket Tracker'[@'Service ID'], State ) )

    ,Status=StatusDropdown.SelectedText.Value)

    ------------

    If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

  • dlprentice Profile Picture
    628 on at

    YOU ROCK!

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