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

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
Highlighted
Community Support
Community Support

Re: Filter gallery by quarter

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
Highlighted
Community Support
Community Support

Re: Filter gallery by quarter

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

Highlighted
New Member

Re: Filter gallery by quarter

Hi Bof,

 

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

 

Kind regards,

 

Freddie

Highlighted
Community Support
Community Support

Re: Filter gallery by quarter

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
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,994)