web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

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
    SaiRT14 Profile Picture
    1,990 Super User 2025 Season 2 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.
  • ronaldwalcott Profile Picture
    3,847 Super User 2025 Season 2 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
    MichaelFP Profile Picture
    1,847 Super User 2025 Season 2 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.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
Kalathiya Profile Picture

Kalathiya 421

#2
WarrenBelz Profile Picture

WarrenBelz 365 Most Valuable Professional

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 339 Super User 2025 Season 2

Last 30 days Overall leaderboard