Forum Discussion

jeffvdt's avatar
jeffvdt
New Contributor II
4 days ago

Issue with Zero Input Not Triggering Calculations in OneStream

Hi all,

I’ve encountered an issue in OneStream where inputting a value of 0 does not trigger any calculations, while entering 0.1 or any other non-zero value works as expected.

From what I understand, this seems to be related to Zero Suppression, which may be preventing the system from storing or processing the zero value. However, I’d like to confirm if this is standard behavior, or if there’s a recommended best practice for handling zeros in data input and calculations (e.g., in cube views or business rules).

Thanks!

3 Replies

  • JackLacava's avatar
    JackLacava
    Community Manager

    I'd need to clarify what you mean by "triggering" and "inputting" before i could be sure of what is going on. How are you entering this data? How is the calculation supposed to be launched?

    There are settings on the cube that prevent calculations from running if the dataunit does not contain any data. If the zero is somewhat purged or not actually saved (for example, if you have a Save Data Event Handler triggered when entering data in a form), the dataunit will be empty and those settings might then prevent calculations from running on it.

  • T_Kress's avatar
    T_Kress
    Valued Contributor

    There are typically 3 ways member formulas or BRs can write calculations simplistically:

    1. api.Data.Calculate("A#YourAccount = RemoveNoData(A#" & accountName & ")")
    2. api.Data.Calculate("A#YourAccount = RemoveZeros(A#" & accountName & ")")
    3. api.Data.Calculate("A#YourAccount = (A#" & accountName & ")")

     

    The first way only removes true no data cells.  Sometimes you may need this if you need a zero picked up when calculations run.

    The second way will remove no data but also remove zero values from things on the right hand side of the "=".  This is probably the most common and recommended but again, there can be times when you do not want to exclude zeros so need to use the first way.

    The third way is almost never recommended as it does not remove either no data or zeros meaning it will run on every possible combination of elements to the right of the "=" and can explode your data unit.

    It sounds like your calculation may have been written with #2 and you may need to switch it to #1.  In a DEV app you could find and change the RemoveZeros to RemoveNoData and see if that resolves your issue.  This may impact more than one calculation and may also impact historical results by changing it, depending on the formula.  So, I would recommend testing in a DEV app first.

     

  • rhankey's avatar
    rhankey
    Contributor II

    Are you sure there wasn't a zero already stored in the Data Unit when you attempted to enter a zero?