cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Helper I
Helper I

Filter gallery by quarter

Hi all,

 

I have a gallery which is linked to a sharepoint list. One of the columns in SharePoint is a date column. I am able to filter my gallery by the months January-December using a drop down, but when I add Q1, Q2, Q3, Q4 to the list of IDs in my drop down, I cannot filter the gallery by Q1, Q2, Q3, Q4 or using the IDs for these options..

 

Here is my list of IDs/Months: 

freddiejoseph1_0-1596034012328.png

 

Here is my gallery items:

freddiejoseph1_2-1596034757082.png

 

The whole formula works except the section around the quarters and combining the items which have January and February and March as a month.

 

I would appreciate some help around how I can filter a sharepoint list by Q1, Q2, Q3, Q4 in a powerapps gallery.

 

Thanks,

 

Freddie

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @freddiejoseph1 :

Firstly,let me exolain why you encounted this problem.

The point is the condition

 

drpPartner.Selected.Value='All' And DropdownDate.Selected.Mon = "Q1"

 

is contained by

 

drpPartner.Selected.Value='All' And DropdownDate.Selected.Mon<>"ALL"

 

.

So the event after condition 

 

drpPartner.Selected.Value='All' And DropdownDate.Selected.Mon = "Q1"

 

will never be executed.

Secondly,please try:

Sort(
     Search(
            If(
               drpPartner.Selected.Value='All' And DropdownDate.Selected.id=0,
               'Tactical Comms'
               drpPartner.Selected.Value='All' And DropdownDate.Selected.id<=12,
               Filter('Tactical Comms',Month(CommunicationReleaseDate)=DropdownDate.Selected.id),
               drpPartner.Selected.Value='All' And DropdownDate.Selected.id = 13,
               Filter(XXXXXXXX),
               drpPartner.Selected.Value='All' And DropdownDate.Selected.id = 14,
               Filter(XXXXXXXX)……

Best Regards,

Bof

View solution in original post

3 REPLIES 3
Community Support
Community Support

Hi @freddiejoseph1 :

Firstly,let me exolain why you encounted this problem.

The point is the condition

 

drpPartner.Selected.Value='All' And DropdownDate.Selected.Mon = "Q1"

 

is contained by

 

drpPartner.Selected.Value='All' And DropdownDate.Selected.Mon<>"ALL"

 

.

So the event after condition 

 

drpPartner.Selected.Value='All' And DropdownDate.Selected.Mon = "Q1"

 

will never be executed.

Secondly,please try:

Sort(
     Search(
            If(
               drpPartner.Selected.Value='All' And DropdownDate.Selected.id=0,
               'Tactical Comms'
               drpPartner.Selected.Value='All' And DropdownDate.Selected.id<=12,
               Filter('Tactical Comms',Month(CommunicationReleaseDate)=DropdownDate.Selected.id),
               drpPartner.Selected.Value='All' And DropdownDate.Selected.id = 13,
               Filter(XXXXXXXX),
               drpPartner.Selected.Value='All' And DropdownDate.Selected.id = 14,
               Filter(XXXXXXXX)……

Best Regards,

Bof

View solution in original post

Hi Bof,

 

Your solution worked. Thank you so much for your help!

 

Kind regards,

 

Freddie

Hi @freddiejoseph1 :

Is there anything else I can help?
If this post helps, then please consider Accept it as the solution to help others.Thanks😀
Best Regards,
Bof

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (8,683)