Skip to main content

Notifications

Community site session details

Community site session details

Session Id : hYKeLOw9GoLRDgKrXGcw84
Power Apps - Building Power Apps
Unanswered

Show upcoming Birthdays

Like (0) ShareShare
ReportReport
Posted on 17 Feb 2024 17:49:23 by 17

Hi

I've gone through every thread I found regarding a gallery showing upcoming birthdays but nothing seems to work for me...
I just can't figure out how to do this. I understand the logic behind it, but I can't get the formulas to work.

 

I have a Canvas-App with a Dataverse table called "Clients", in it a column called "Birthday" (format DateOnly).

I would like my gallery to show the birthdays for Today()+7. 

 

Grateful for any suggestions.

Thanks in advance

Categories:
  • CustomCruiser Profile Picture
    17 on 17 Feb 2024 at 23:56:44
    Re: Show upcoming Birthdays

    The second formula doesn't work, but the first one finally solved my problem 🙂 
    Thank you so much!!

  • Verified answer
    BCBuizer Profile Picture
    21,928 Super User 2025 Season 1 on 17 Feb 2024 at 21:10:03
    Re: Show upcoming Birthdays

    Hi @CustomCruiser , 

     

    Guess I was thrown off by the title of the column, since it actually contains the date of birth.

     

    In that case I'd try using the AddColumns function to add a column with the next upcoming birthday:

     

    Filter(

        AddColums(

           Clients,

           "NextBirthday",

           If(

               Date(Year(Today()), Month(Birthday), Day(Birtday)) < Today(),

               Date(Year(Today())+1, Month(Birthday), Day(Birtday)),

               Date(Year(Today()), Month(Birthday), Day(Birtday))

           )

        ),

        NextBirthday = Today() +7

    )

     

    The reason for the If function is for birtdays in the first week of January where, in the last week of December, nothing would get returned because the year is not set correctly.

     

    Apologies up front for any syntax errors, I'm typing this on my phone. 

     

    EDIT: an easier way may be:

     

    Filter(

        Clients,

        Day(Birthday) = Day(Today()+7),

        Month(Birthday) = Month(Today()+7))

    )

  • CustomCruiser Profile Picture
    17 on 17 Feb 2024 at 20:15:48
    Re: Show upcoming Birthdays

    This is something I tried:


    If( Month(Birthday) < Month(UTCToday()) Or ((Month(Birthday)) = Month(UTCToday()) And Day(Birthday) < Day(UTCToday())) , DateAdd(Birthday,Year(UTCToday())+1-Year(Birthday),TimeUnit.Years) , Date(Year(UTCToday()),Month(Birthday),Day(Birthday)) )

     

    The last line always generated an error. It said Date is not a valid operator

     

  • BCBuizer Profile Picture
    21,928 Super User 2025 Season 1 on 17 Feb 2024 at 19:49:22
    Re: Show upcoming Birthdays

    Hi @CustomCruiser,

     

    My first try would be the below in the Items property of the gallery:

     

    Filter(Clients, Birthday = DateAdd(Today(),7))

     

    However, there may be something in your app I'm not aware of to be taken into account. If the above doesn't do the trick, please share what you have already tried and what the exact outcome was.

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,518 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,749 Most Valuable Professional

Leaderboard
Loading started