Showing results for 
Search instead for 
Did you mean: 
Helper IV
Helper IV

Groupby multiple sharepoint list column; latest check in time per person, date,office


Im just starting with powerapps and powerautomate but struggle with filters and codes

Maybe i started the wrong way but i have a button in powerapps that inserts a username, IN\OUT, date, time and officename into a sharepoint list. 


In order to find out who is in de building at that time i want to present a list in Powerapps.


Because they can check in and out several times a day i only want to filter the persons with there latest check IN

(step 2: and no check OUT after check in time)


For now i have a filter that works, but only for one person who checked in as latest.

Filter('Precense list',Time=First(Sort(Distinct('Precense list',Time),Result,Descending)).Result)


I want this filter to show ALL persons that checked in with there latest check in time.

(step 2: and no check OUT after check in time) 


Hope someone can help me to achieve this


Hi @v-bofeng-msft ,


You are amazing!, im so glad with your quick response.

But the reason i want to make collections is because i want the result of the  latest Check IN time and latest Check OUT time for that user, office, date. so i can calculate if they are in the building or left the building, at that moment.


Maybe I am thking the wrong way but this way it worked for me in Excel. 

The result in Excel after combining these 2 is this:

result excel.PNG




Hi @Yvonzim :

I get it.

Now you can get the two tables of Check-In and Check-Out through the formula I gave you. The only thing you have to do is to connect the two tables in a Join way.

But powerapps does not have a function like join in the database. As an alternative, you can use AddColumns.

I think this link will help you a lot:

Best Regards,


View solution in original post



Thank you so much, one day i will be able to help others 🙂




Helpful resources

PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (1,160)