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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Get last workday in a ...
Power Apps
Unanswered

Get last workday in a full week of a month

(0) ShareShare
ReportReport
Posted on by 284

Hello guys,

 

I encountered the following problem. 
I have to disabled the displaymode of a button based on the selected Date of a DatePicker.

 

The Button should be enabled until its the last day of the last full week, For example: August 2022. The last day the button should be enabled is the 8/26 because its the last workday of the last full week of a month.

 

I came up to the following 

 

If(
 !(Month(Self.SelectedDate + 7) <> Month(Today()) || Month(Self.SelectedDate + 7) <> Month(
 Date(
 Dropdown_Jahr.Selected.Value,
 Switch(
 Dropdown_Monat.Selected.Value,
 "Januar",
 1,
 "Februar",
 2,
 "März",
 3,
 "April",
 4,
 "Mai",
 5,
 "Juni",
 6,
 "Juli",
 7,
 "August",
 8,
 "September",
 9,
 "Oktober",
 10,
 "November",
 11,
 "Dezember",
 12
 ),
 1
 )
 )),
 Edit,
 Disabled
)

 

The Siwtch is because we have a Dropdown. The button shouldn't be disabled if the date is one month back
This is because in my example the 29/30/31 August have to be filled out together with semptember.


have you guys a way to fullfill my needs? At least if i can get the last workday of a full week?

Categories:
  • Akser Profile Picture
    1,546 Moderator on at

    You are not looking for the last Friday of the month, right?

     

    With({NextMonth:
     DateAdd(
     Date(Year(Now()),Month(Now()),1),1,Months
     )
     },
     DateAdd(
     NextMonth, -1 * Weekday(DateAdd(NextMonth, - 6))
     )
    )
  • RiccoHipp1903 Profile Picture
    284 on at

    No, while I think about it, I really search for the last friday of a month. Because Friday is always the last day of a workweek( in my specific app)

     

    Nevertheless I try your formula

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard