cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Bartdzb
New Member

How to Filter Gallery by Quater and cover thaht filter under button ?

Hello All, 

Can anyone show me the way how I can create a button that, when pressed, will filter the data, divide records into quarters, i.e. 4 buttons Q1, Q2, Q3, Q4 after pressing the Q1 button in the gallery there will be records only with the date from quarter 1

I will be grateful for every idea. 

 

Bartdzb_0-1665490134047.png

 

1 REPLY 1
WarrenBelz
Super User
Super User

Hi @Bartdzb ,

Assuming your quarters start in January, if you put this in your Gallery Items (note YourDataSource includes what is there presently) and you will have a field to filter on - just set varQuarter on the buttons

Filter(
   AddColumns(
       TestFields,
       "Quarter",
       RoundUp(
          (Month(DateTest) + 1) / 4,
          0
       )
   ),
   Quarter = varQuarter
)

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

Visit my blog Practical Power Apps

 

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (2,675)