Forum Discussion

tchev's avatar
tchev
New Contributor III
1 month ago
Solved

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. 

  • 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.

5 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.

    • aricgresko's avatar
      aricgresko
      Contributor III

      I'm getting deeper into a Workforce Planning build and definitely agree with the above enhancement request.  I believe we also need a Register Definition field that allows fields to be hidden, such as these calculated fields we are talking about.  

      • dsebenaler's avatar
        dsebenaler
        New Contributor III

        Agreed on the enhancement request. Also think it would help if there could be date drivers added via cube view drivers. I think you could potentially use the security settings to hide column visibility. For instance, you could have a security group just for LIM WFP owners that could see the helper columns but have them be invisible for all other users. Haven't tested this thoroughly yet, but that is my assumption on how this functionality works. 

  • 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.