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

Community site session details

Session Id : Xhe/igSjm+CP/95d1Zd+Me
Power Apps - Building Power Apps
Unanswered

Calculated Due Date Column Based on Mulitple Choices

Like (1) ShareShare
ReportReport
Posted on 11 Feb 2025 18:13:43 by 44
I am trying to add a calculated column to a table in my power app.
 
 
This is my table:
 
The Due Date1 column was auto generated when the table was created and will be replaced with the new Due Date Calc column (on the end). As you can see, the due date calculation is going to get complicated based on Frequency and Run on Day.
 
The Frequency column contains the following choices:
 
The Run on Day has the following choices:
 
I started just trying to calculate the first Monday of the following month and could only get this far: 
If(Frequency='Frequency (Reports)'.Monthly And 'Run on Day'='Run on Day (Reports)'.Monday, Now()+30,'Last Run Date')
 
Is this going to be too difficult?
 
I have the same question (0)
  • SCastille Profile Picture
    44 on 12 Feb 2025 at 16:00:46
    Calculated Due Date Column Based on Mulitple Choices
    Gosh - thank you so much for the response. Unfortunately, I got this error when I cut/pasted it:
    I removed all the comments, and then got this error:
     
    I think this will have to go on the too hard pile.
  • Ravi-Prajapati Profile Picture
    414 Super User 2025 Season 2 on 12 Feb 2025 at 05:13:36
    Calculated Due Date Column Based on Mulitple Choices
    try this
    If(
        Frequency = 'Frequency (Reports)'.Monthly, 
        // Find the first Monday (or selected day) of the next month
        DateAdd(
            DateValue(Text(DateAdd(Today(), 1, Months), "yyyy-mm-01")), 
            Mod(8 - Weekday(DateValue(Text(DateAdd(Today(), 1, Months), "yyyy-mm-01"))), 7),
            Days
        ),
        Frequency = 'Frequency (Reports)'.Weekly, 
        DateAdd('Last Run Date', 7, Days), 
        Frequency = 'Frequency (Reports)'.Biweekly, 
        DateAdd('Last Run Date', 14, Days), 
        Frequency = 'Frequency (Reports)'.Quarterly, 
        // First Monday (or selected day) of the next quarter
        DateAdd(
            DateValue(Text(DateAdd(Today(), 3, Months), "yyyy-mm-01")), 
            Mod(8 - Weekday(DateValue(Text(DateAdd(Today(), 3, Months), "yyyy-mm-01"))), 7),
            Days
        ),
        Frequency = 'Frequency (Reports)'.Yearly, 
        // First Monday (or selected day) of the same month next year
        DateAdd(
            DateValue(Text(DateAdd(Today(), 12, Months), "yyyy-mm-01")), 
            Mod(8 - Weekday(DateValue(Text(DateAdd(Today(), 12, Months), "yyyy-mm-01"))), 7),
            Days
        ),
        'Last Run Date' // Default to Last Run Date if no Frequency matches
    )
     

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Tom Macfarlan – Community Spotlight

We are honored to recognize Tom Macfarlan as our Community Spotlight for October…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 885 Most Valuable Professional

#2
developerAJ Profile Picture

developerAJ 571

#3
Michael E. Gernaey Profile Picture

Michael E. Gernaey 352 Super User 2025 Season 2

Last 30 days Overall leaderboard