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 / Display date based inf...
Power Apps
Answered

Display date based information in a Gallery container

(0) ShareShare
ReportReport
Posted on by 223

Dear All,

Trying to figure out how to go about this. I have a SharePoint list as shown below;

S1.PNG

 

My question is

1. How can i Group the information by year as shown below

S1.PNG

The would will be in a gallery container.

2. Would like to add a checkbox (cb) to view upcoming years only. For instance, If the current year is 2022, When you select the checkbox, The gallery container only displays 2023 and later years.

 

3. Is it possible to group the Title and also the amount while using a drop-down (Year). See below.

S1.PNG

 

The above image (Gallery 2 View), Shows only the amount of AA1 for 2021.

Thanks.

Categories:
  • Verified answer
    Krishna_R Profile Picture
    525 on at

    Hi @caslasgee 

    You can achieve this with a combination of the "AddColumns" and "GroupBy" functions. First, you will need to extract the year value from the data, and then you can apply filters and group actions.

    To address questions 1 and 2, you can use the following formula

    With({data:GroupBy(AddColumns(ListA,"year",Year(Date)),"year","yearData")},If(cb.Value,Filter(data,year>Year(Now())),data))

    Krishna_R_0-1688893941853.png

    For the last question, you can use the group by with 2 columns as shown below:

    GroupBy(Filter(AddColumns(ListA,"year",Year(Date)),year = Dropdown1.Selected.Value),"year","Title","yearData")

     

    Krishna_R_1-1688894012781.png

    Make sure to calculate the sum in the gallery for the label, as shown below:

    Sum(ThisItem.yearData,YearlyBudget)

    Krishna_R_3-1688894101839.png

     

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard