2 Replies Latest reply: Jul 17, 2014 1:42 AM by vishal waghole RSS

    Set Analysis Problem.

    Luke Chatterton

      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