Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There,
I really want to write this formula but not sure how...
I want all the entries for the current month
This works:
Sum({$<KeyDate = {">=$(=Only(AsAtMTD))<=$(=Only(AsAtMonthEnd))"}>} BudgetNonAccommodationCleaningDailyHours)
But instead of AsAtMonthEnd I want this value which is the latest timesheet entry which is the result of the next expression.
Max({$<KeyDate = {">=$(=Only(AsAtMTD))<=$(=Only(AsAtMonthEnd))"}, TimesheetHoursWorked={">0"}>} KeyDate)
How could I write the expression to achieve this?
e.g. Which doesn't work.
Sum({$<KeyDate = {">=$(=Only(AsAtMTD))"}, KeyDate = P({Max({$<KeyDate = {">=$(=Only(AsAtMTD))<=$(=Only(AsAtMonthEnd))"}, TimesheetHoursWorked={">0"}>} KeyDate)>} )>} BudgetNonAccommodationCleaningDailyHours)
Thanks in advance
Luke
Hi,
Store the value of this expression in a variable
vLatestTimesheetEntry = Max({$<KeyDate = {">=$(=Only(AsAtMTD))<=$(=Only(AsAtMonthEnd))"}, TimesheetHoursWorked={">0"}>} KeyDate)
and then use this expression in set analysis
Sum({$<KeyDate = {">=$(=Only(AsAtMTD))<=$(vLatestTimesheetEntry))"}>}
Hi Like,
Sum({<KeyDate={">=$(=Num(MonthStart(Max(KeyDate))))<=$(=Max(KeyDate))"}, TimesheetHoursWorked={">0"} >} BudgetNonAccommodationCleaningDailyHours)
Hope this expression work for you.
-- Regards,
Vishal Waghole