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 / View to add data from ...
Power Apps
Suggested Answer

View to add data from two tables (trips and COUNT() of items)

(1) ShareShare
ReportReport
Posted on by 40
I am trying to get make a view or other way to get data, for a trip and count of items transported.
 
I am using Dataverse.
TripTable is the main table, with and id (trip_id).
TripItems is a table holding items in a specific transport. It holds it own ID field, and a trip_id field to mark which trip it belongs to.
It can be an indendepent table, or lookup towards trip table.
 
I want to read some items from trip table, say id, departure_time and destination.
Then the count of rows in the Items table, where the trip_id is matching.
 
I have tried a view and to create an object using AddColoumns, but have not found the solution
 
In SQL, it would be easy:
 
select trip.id, trip.departure_time, trip.destination,
  (select count(id) from tripItems as ti where ti.trip_id=trip.id) as count
from trips
WHERE trip.deleted=0
Order by - would be lovely here
 
How can I do this using Dataverse and PowertApps?
I have the same question (0)
  • Suggested answer
    MichaelFP Profile Picture
    1,863 Moderator on at
    Yeas, but you need to use group by of the fetchxml Aggregate data using FetchXml - Power Apps | Microsoft Learn
     
    With that you will be able to get the count rows for the child table.
     
    If my answer helped you, please give me a thumbs up (👍). If solve your question please mark as answer ✔️. This is help the community.
  • ronaldwalcott Profile Picture
    3,862 Moderator on at
    You could try creating a view on the TripItems table and include the columns from the TripTable which you need then apply the count after reading the data in PowerApps.
  • Suggested answer
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 1 on at
    pls try the following:
     

    Consider creating a Rollup Column in Dataverse:

    • Go to TripTable in Dataverse and create a Rollup Column for counting related TripItems records.
    • Configure it to count rows in TripItems where trip_id matches the current TripTable row.

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!

Leaderboard > Power Apps

#1
wolenberg_ Profile Picture

wolenberg_ 119 Super User 2026 Season 1

#2
WarrenBelz Profile Picture

WarrenBelz 107 Most Valuable Professional

#3
Haque Profile Picture

Haque 103

Last 30 days Overall leaderboard