web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Calendar Gallery to fi...
Power Apps
Answered

Calendar Gallery to filter Browse Gallery, multiple filters

(0) ShareShare
ReportReport
Posted on by Microsoft Employee

Building an App for users to sign up for training courses. Right now I have my "Browse Gallery" being filtered by Check boxes and a search box.

 

SortByColumns(
If( 
CheckboxAdmin.Value,Filter('Test: classes',Category.Value="Administrative"),
CheckboxConstruct.Value, Filter('Test: classes',Category.Value="Construction") ,
CheckboxGen.Value, Filter('Test: classes',Category.Value="General"),
CheckboxSafe.Value, Filter('Test: classes',Category.Value="Safety"),
Search('Test: classes', TextSearchBox1.Text, "Title")),"Date")

 

This is my current filter that works just fine. I want to add the Calender filtering option. 

 

I have a calendar from a gallery:

calendargallery.png

 

Right now my Sharepoint list has the StartDate and EndDate formatted as text. 

 

How would I write the formula to filter the dates, the checkboxes, and the search textbox?  Is there another way to filter a gallery?

Categories:
I have the same question (0)
  • Verified answer
    v-siky-msft Profile Picture
    Microsoft Employee on at

    @Anonymous 

     

    Is the calendar a component? What is the output property?

    I assume the properties are StartDateProperty and EndDateProperty.

    Please try this:

    SortByColumns(
    If(
    CheckboxAdmin.Value,Filter('Test: classes',Category.Value="Administrative" && Calendar.StartDateProperty>DateValue(StartDate) && Calendar.EndDateProperty>DateValue(EndDate)),
    CheckboxConstruct.Value, Filter('Test: classes',Category.Value="Construction" && Calendar.StartDateProperty>DateValue(StartDate) && Calendar.EndDateProperty>DateValue(EndDate)) ,
    CheckboxGen.Value, Filter('Test: classes',Category.Value="General" && Calendar.StartDateProperty>DateValue(StartDate) && Calendar.EndDateProperty>DateValue(EndDate)),
    CheckboxSafe.Value, Filter('Test: classes',Category.Value="Safety" && Calendar.StartDateProperty>DateValue(StartDate) && Calendar.EndDateProperty>DateValue(EndDate)),
    Search(Filter('Test: classes',Calendar.StartDateProperty>DateValue(StartDate) && Calendar.EndDateProperty>DateValue(EndDate)), TextSearchBox1.Text, "Title")),"Date")

    Sik

  • Community Power Platform Member Profile Picture
    Microsoft Employee on at

    @v-siky-msft 

     

    Thanks Sik!

     

    I did have to tweak your solution to fit my properties but there is a small issue maybe you can help me with. Here is my current formula.

    SortByColumns(
    If(
    CheckboxAdmin.Value,Filter('Test:CourseCatalog',Category.Value="Administrative" && _selectionStart<=StartDate && _selectionEnd>=EndDate),
    CheckboxConstruct.Value, Filter('Test:CourseCatalog',Category.Value="Construction" && _selectionStart<=StartDate && _selectionEnd>=EndDate) ,
    CheckboxGen.Value, Filter('Test:CourseCatalog',Category.Value="General" && _selectionStart<=StartDate && _selectionEnd>=EndDate),
    CheckboxSafe.Value, Filter('Test:CourseCatalog',Category.Value="Safety" && _selectionStart<=StartDate && _selectionEnd>=EndDate),
    Search(Filter('Test:CourseCatalog',_selectionStart<=StartDate && _selectionEnd>=EndDate), TextSearchBox1.Text, "Title")),"Date")

     The issue is, now when there are no dates selected, no classes show up. 

     

    It should be when no dates are selected (or any other filter) ALL the classes are shown. 

     

    Can you help?

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 914

#2
11manish Profile Picture

11manish 627

#3
Valantis Profile Picture

Valantis 598

Last 30 days Overall leaderboard