Hello all,
Im in the process of building a leave request app. I have a column which totals the Days Taken using the datediff between a start date and end date, it also omits weekends and holidays from an embedded spreadsheet using the forrula below;
RoundDown(DateDiff(fld_Start_Date.SelectedDate, fld_End_Date.SelectedDate, Days) / 7, 0) * 5 +
Mod(5 + Weekday(fld_End_Date.SelectedDate) - Weekday(fld_Start_Date.SelectedDate), 5)
-CountIf(Table1, HolidayDate >= fld_Start_Date.SelectedDate, HolidayDate <= fld_End_Date.SelectedDate)
This works great. If had a request to account for half days, so I created a dropdown in my list called day type, the selections are "Half Day" or "Full Day", if Half Day is selected I want the Days Taken field to only read .5, anything else I want the column to be the result of the formula above.
No matter what I try, the formula seems to error. Can anyone see where I'm going wrong here?
Hi @dkent,
Glad that you have solved your problem.
To explain more, What I want to know is the formula you set for the Drop down, I do really know that you populate it in Power Apps.
I guess you set the Items as DataSource.ColumnName
Since you have solved your problem, I want to tell you that you have used a Text column to fill in the Drop down, so it should be DD.Selected.ColumnName when you want to refer to DD.Selected.
Please mark your own reply as answer to help more people to find it.
Regards,
Qi
Hello, I figured it out my syntax was wrong, I changed to fld_day_type.Selected.Title and id works fine. But to answer your question, the DD is populated from within a powerapp.
Hi @dkent,
Based on the issue that you mentioned, do you want to write an If statement based on the Dropdown selected?
Could you please tell me that how you set the Items property of your day type Drop down?
The key to your issue is the Items property of the day type Drop down.
Tell me the Items formula and the error message.
Regards,
Qi
WarrenBelz
791
Most Valuable Professional
MS.Ragavendar
410
Super User 2025 Season 2
mmbr1606
275
Super User 2025 Season 2