Forum Discussion

tchev's avatar
tchev
New Contributor III
20 days ago

Calculate HC in LIM for Mid-Month Start

Is there an ability to calculate HC expenses that account for when in the month an employee starts and prorate accordingly? As an example, if the employee starts on the 15th then their monthly salary would be Salary / 12 * (15/30). The syntax available in the blocks don't clearly identify if this can be done. 

2 Replies

  • T_Kress's avatar
    T_Kress
    Icon for OneStream Employee rankOneStream Employee

    Not out of the box, right now.

    You have to use a custom event handler to calculate additional fields as follows:

    • Start Date - normal register field
    • End Date - normal register field
    • S_Day - calculate via custom event handler to then be used in formulas
    • S_Month - calculate via custom event handler to then be used in formulas
    • S_Year - calculate via custom event handler to then be used in formulas
    • E_Day - calculate via custom event handler to then be used in formulas
    • E_Month - calculate via custom event handler to then be used in formulas
    • E_Year - calculate via custom event handler to then be used in formulas

     

    Once you have the start date and end date parsed out, you can then take the day in the month for whichever is needed (S_DAY or E_Day) and bump it against a cube driver of days in month to get the partial or mid-month calculation needed.

    These fields do not do that:

     

    As an enhancement request I think the following Functions are needed out-of-the-box:

    • Day(Date)
    • Month(Date)
    • Year(Date)

     

    Where Day(Date)  of 3/15/2026 would return 15 and Month(Date) of 3/15/2026 would return 3 and Year(DAte) of 3/15/2026 would return 2026 as then you would have the pieces needed to do mid-month or partial month calculations.

    Right now the work around is to do via a custom event handler in LIM.

  • michaelkeung's avatar
    michaelkeung
    New Contributor III

    Do you have the info in the raw data?

    If full month = 1, 15 days = 0.5 , for example.
    Then it should be easy to handle with that column.