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 / 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:
I have the same question (0)
  • 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

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
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard