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 / Dropdown Contains Date...
Power Apps
Unanswered

Dropdown Contains Dates in Two Week Groups

(0) ShareShare
ReportReport
Posted on by 5,325 Super User 2025 Season 2

I need a Dropdown that allows the user to choose a date range that includes two weeks at a time.

When the user opens the Dropdown they should be able to choose from a list of date (in two week blocks), with the defaul date being including current date, however that range shoud start at the Sunday before.

The should be able to go as far back a one month and as far into the feature as the system allows.

Phineas_1-1659585358625.png

 

 

Categories:
I have the same question (0)
  • rb Profile Picture
    835 Super User 2024 Season 1 on at

    Hey @Phineas,

     

    If you are generating this dynamically in PowerApps, it will be different every time you load it - is that OK?

     

    Here is an example of how I implemented with a combo box (so I could show the period number and the date range at the same time):

    metsshan_0-1659589525986.png

     

    With(
     //Get Sunday before-last as Seed Day
     {SeedDate: DateAdd(Today(), -Weekday(Today(), Monday) - 7, Days)},
     ForAll(
     //Generate a list of 2-week period starting from 2 periods before Seed Date
     Sequence(10, -2, 1) As Offset,
     {
     Number: Text(Offset.Value + 3),
     Dates: Text(DateAdd(SeedDate, Offset.Value * 14, Days), "dd/mm/yyyy") & " - " & Text(DateAdd(SeedDate, (Offset.Value + 1) * 14 - 1, Days), "dd/mm/yyyy")
     }
     )
    )

     

     

    The first argument of Sequence(), which is 10 in my example, can be adjusted to determine the number of periods generated.

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 796 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 327 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard