cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Sean_T
Frequent Visitor

Filtering a Gallery based on Day, week and Year

Hi,

 

I have a gallery that is currently filtered on week and day of that week by the way of dropdowns, code below. I need to add in year as well as we roll over into 2023, otherwise I'll get all week 1 info for both 2022 and 2023, code below which I currently use:

 

Filter('PowerApps 5Y List',ISOWeekNum(DateAdd(Created,-6,Hours))=Dropdown_Gallery_Week_1.Selected.Value And Text(DateAdd(Created,-6,Hours),"dddd")=Dropdown_Gallery_Day_1.Selected.A)

 

What do i need to add in to filter by current year automatically, or, do I need to add a further dropdown?

 

thanks

 

sean 

1 ACCEPTED SOLUTION

Accepted Solutions
LaurensM
Memorable Member
Memorable Member

@Sean_T 

Could you add the code below:

Year(CreatedField) = Year(Today())

 

If you want to switch between years, you will need to add an additional dropdown.

View solution in original post

1 REPLY 1
LaurensM
Memorable Member
Memorable Member

@Sean_T 

Could you add the code below:

Year(CreatedField) = Year(Today())

 

If you want to switch between years, you will need to add an additional dropdown.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (3,428)