Skip to main content

Notifications

Community site session details

Community site session details

Session Id : QbY9WmlrXYHUt+i3t+w6MS
Power Apps - Building Power Apps
Answered

Group gallery by date range

Like (0) ShareShare
ReportReport
Posted on 13 Oct 2023 13:20:53 by 72

Hi,

 

I'm currently building a timesheet app. For context, each timesheet record is being added to a SharePoint list, this means records have the same date range (as they are done weekly), etc. as each day will have several records. Hopefully, that makes sense, I have attached an image of the timesheet input screen.  

 

I have a screen where you can view and select the timesheets you have submitted but it's obviously showing all records. I want to group these records by the date range/week so you can select the timesheet based on the week.

What I also have that is making it difficult for me to figure out how to group it, is that the timesheets have an approval status. But the records will be approved by different approvers so it means some records may be approved and others pending approval.

 

I have successfully grouped it by date range, please see the images attached, but as you can see this makes the status field hard to read as it lists all the statuses. Is there any way I can concise this so it will show the different statuses but won't list all the record's statuses?

 

Please let me know if this needs more explanation.

Thanks,

Caoimhe

  • Verified answer
    caoimhelambert Profile Picture
    72 on 02 Nov 2023 at 16:13:26
    Re: Group gallery by date range

    Figured it out. Use the Distinct function, for example using Shane's video, PowerApps GroupBy function and Nested Galleries - YouTube);

    Concat(
    Distinct(
    ThisItem.DATA,
    Employee.DisplayName
    ), Value & "")

  • caoimhelambert Profile Picture
    72 on 16 Oct 2023 at 11:15:00
    Re: Group gallery by date range

    Hi @FLMike ,

     

    Sorry, I haven't explained it too well, hopefully this is clearer.

    I followed a tutorial (PowerApps GroupBy function and Nested Galleries - YouTube) and used the GroupBy function to group the gallery by the title - which is the date range and by the approval status. I believe I created a groupby data set (which is DATA) to do this.

    In the approval status field, I've used the concat function, referencing the groupby data set (which is DATA) to show the status. As the group can have several different approval statuses it lists each of the SharePoint records status. 

     

    Is there a way to concise this so it doesn't list every single record's approval status?

  • Michael E. Gernaey Profile Picture
    41,822 Super User 2025 Season 1 on 13 Oct 2023 at 14:32:45
    Re: Group gallery by date range

    hi @caoimhelambert 

     

    Apologies but its not very clear what you need.

     

    What would really help is can you please create some examples of what the order is you want because you first said its grouped by date, then you talk about the status.

     

    Are you asking to group them by Date, and remove the status column?


    If you like my answer, I would really appreciate if you please Mark it as Resolved, and give it a thumbs up, so it can help others

    Cheers

    Thank You
    Michael Gernaey MCT | MCSE | MCP | Self-Contractor| Ex-Microsoft
    https://gernaeysoftware.com
    LinkedIn: https://www.linkedin.com/in/michaelgernaey

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,786 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,093 Most Valuable Professional

Leaderboard
Loading started