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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / PowerApps/Excel Filter...
Power Apps
Unanswered

PowerApps/Excel Filter table by id and date

(0) ShareShare
ReportReport
Posted on by

Hi ! 🙂

 

I'm creating an application with Power Apps. I'm using Excel as database. I created a reservations' table with the following fields :

- id

- id_vehicule

- reservation_date

- hour_reservation_start

- hour_reservation_end

- user

- note

 

I have a screen named Calandar  to select a date with a DatePicker and I also list all reservations in this screen. And another one called Form with my form.

 

(Screen Form)

When I submit my form to create a new reservation I convert my date like this : 

 

 

Text(selectedDate,"dd/mm/yyyy")

 

 

l if I made a reservation for today, I will be write 03/01/2022 in my Excel table.

 

(Screen Calandar)

 

I defined the format DatePicker property to

 

"dd/mm/yyyy"

 

 

And to manipulate the selected date :

 

Text(DatePicker.SelectedDate,"dd/mm/yyyy")

 

 

To list all vehicule's reservations in my Calandar screen, I would like to filter my table by id_vehicule and by reservation_date.

 

On Items gallery property I tried with Filter function and it works when I filter by reservation_date or by id. But it doesn't work when I combine the two.

 

Filter by reservation_date (it works)

 

Filter(
 reservations,
 reservation_date = Text(DatePicker.SelectedDate,"dd/mm/yyyy")
)

 

 

Filter by id (it works)

 

Filter(
 rerservations
 id_vehicule = id
)

 

 

Filter by id_vehicule AND by reservation_date (it doesn't work)

 

Filter(
 reservations,
 And(
 reservation_date = Text(
 DatePicker.SelectedDate,
 "dd/mm/yyyy"
 ),
 id_vehicule = id
 )
)
Filter(
 reservations,
 reservation_date = Text(DatePicker.SelectedDate,"dd/mm/yyyy") And id_vehicule = id
)
Filter(
 reservations,
 reservation_date = Text(DatePicker.SelectedDate,"dd/mm/yyyy") && id_vehicule = id
)

 

 

Please can you help me ?

 

Thank you 🙏

Categories:
I have the same question (0)
  • CU-18081211-6 Profile Picture
    9,270 Moderator on at

    @Anonymous ,

    Excel connector does not support multiple filter conditions. To achieve your goal use:

     

     

    With(
     {datasourceFilterByID:
     Filter(reservations,reservation_date = Text(DatePicker.SelectedDate,"dd/mm/yyyy")},
    Filter(
     datasourceFilterByID,
     id_vehicule = id)
     )
    )

     

     

    This approach will bring all reservations for selected day with a query executed on server side and then the result will be filtered locally.

    Hope it helps !

     

  • Verified answer
    Community Power Platform Member Profile Picture
    on at

    Thank you for you help

     

    I tried with this solution 

    Filter(
     reservations,
     reservation_date = Text(
     DatePicker.SelectedDate,
     "dd/mm/yyyy"
     ) And Value(id_vehicule) = Value(id)
    )

    And it works 🙂

  • v-xiaochen-msft Profile Picture
    on at

    Hi @Anonymous ,

     

    Glad to see you solved this problem. 

    You could mark the correct reply as a solution .

     

    Best Regards,

    Wearsky

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 717 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 329 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard