Skip to main content

Notifications

Community site session details

Community site session details

Session Id : EsykljlLLF2WRDmG5Ywjyq
Power Apps - Building Power Apps
Answered

Filter with selected value by current date

Like (0) ShareShare
ReportReport
Posted on 20 Jun 2023 12:23:00 by 96

Hello!

I need a filter (ShiftsDropDown) that will display in a gallery from the SharepointList with the Shifts column only the records (users) from the Current Day.

 

If I choose from the ShiftsDropDown the "Morning" value of the Shift Today filter, only the users with the "Morning" shift from the respective week of the current day will be displayed.

 

In Sharepoint I have the following columns. Title (Employee Name), Shifts, StartDate, EndDate and GroupName.

 

Could someone help me with a solution and write it for me, please? Many thanks!

Categories:
  • Verified answer
    Calin_Mateut Profile Picture
    96 on 21 Jun 2023 at 07:31:37
    Re: Filter with selected value by current date

    I solved it. Thank you for your help @turnerj3 !

    Distinct(Search
    (Filter
        ('Schedule Calendar',
       IsBlank(GroupDropDown.Selected.Value) || IsEmpty(GroupDropDown.SelectedItems)   || Group = Text(GroupDropDown.Selected.Value),
       Today()>=StartDate And Today()<=EndDate And Shifts= ShiftSelectorToday.Selected.Value),
    SearchByName.Text, "Title"), Title)
  • Calin_Mateut Profile Picture
    96 on 21 Jun 2023 at 07:21:22
    Re: Filter with selected value by current date
    I apologize @turnerj3  ! I made the mistake of entering it in the wrong place.
     
    After I inserted it inside Filter() it worked, but I need it to display my Shift from Today(), but for Today() to be between the StartDate and EndDate period.
     
    For example: I select the "Morning" Shift for Today, but it displays the Records that include Today in the StartDate and EndDate periods. Today = June 21, 2023, displays the records with the "Morning" - Today Shift from June 19 - June 23.
     
    Please look at the attached picture. The June 21 column is selected because it is Today, but it displays my 2 records because it includes Today between StartDate and EndDate.
  • Calin_Mateut Profile Picture
    96 on 21 Jun 2023 at 06:50:04
    Re: Filter with selected value by current date
    Hi @turnerj3 ! I tried to insert your formula in gallery items to filter, but it doesn't work! 
    I have multiple filters in the gallery! Can you please take a look on the formula below? 
     
    Distinct(Search
    (Filter
        ('Schedule Calendar',
       IsBlank(GroupDropDown.Selected.Value) || IsEmpty(GroupDropDown.SelectedItems)   || Group = Text(GroupDropDown.Selected.Value)),
       StartDate > Today() And Shifts = ShiftSelectorToday.Selected.Value
    SearchByName.Text, "Title"), Title)
  • Verified answer
    turnerj3 Profile Picture
    2,039 on 20 Jun 2023 at 16:38:02
    Re: Filter with selected value by current date

    @Calin_Mateut ,

    Try this in your Gallery Items Property.

    Filter(SPList,StartDate>Today() And Shifts=ShiftsDropDown.SelectedText.Shifts)

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Warren Belz – Community Spotlight

We are honored to recognize Warren Belz as our May 2025 Community…

Congratulations to the April Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard > Power Apps - Building Power Apps

#1
MS.Ragavendar Profile Picture

MS.Ragavendar 10

#2
LC-26081402-0 Profile Picture

LC-26081402-0 6

#3
EE-04041031-0 Profile Picture

EE-04041031-0 4

Overall leaderboard
Loading started