Forum Discussion

fc's avatar
fc
New Contributor III
5 months ago

Consolidation process

Hi everyone,
 
I'm having issues when launching the consolidation process after loading data on the cube.
Below you can see the calculation that is triggered when the consolidation process is launched:
 
api.Data.ClearCalculatedData(True, False, False,"A#2A900A01","F#CHI","I#None")
api.Data.Calculate("A#2A900A01:U1#None:U3#None:U5#None:I#None:F#CHI=A#3ABCDEF0:U1#TotProduct:U3#TotMarket:U5#TotCostCenter:I#Top:F#None")

The 3ABCDEF0 account is the top node of the PL account hierarchy, and the intersection is correctly populated.

The 2A900A01 is the balance sheet account that should be populated as a result of the consolidation process, nevertheless it doesn't get populated. I have already verified the intersections, and they are correct.

Does anyone have any suggestion on why the 2A900A01 account does not get populated?

I know the question is a bit vague but I'm really struggling to understand what the issue might be


Thanks in advance for any help!

  • Henning's avatar
    Henning
    Valued Contributor II

    Hi,

    First you verify that the calculation is actually triggered by using adding e.g. the following to your rule:

    BRApi.ErrorLog.LogMessage(si, "YES!")

    You check the error log and if you find your "YES!" in there, you have that confirmed.

    Then you just create a cube view with a valid input cell using A#2A900A01 and select the target cell's POV using right click >> 'Cell POV Information'. Copy the non-data unit part, which will look something like this:

    A#2A900A01:F#CHI:O#Forms:I#None:U1#None:U2#None:U3#None:U4#None:U5#None:U6#None:U7#None:U8#None

    Use this in your formula and test. This should put data on that single cell in your cube view. Then you take away one dimension after another from your formula until you end up with your original string A#2A900A01:U1#None:U3#None:U5#None:I#None:F#CHI. Run the calculation after each one and verify the data is still in your CV. At some point you should be able to see where it does no longer work as expected.

     

    There are more ways, but I hope this is the fastest one for you.

  • fc's avatar
    fc
    New Contributor III

    Hi Henning 

    thank you for the answer.

    The problem seems to be somehow linked to that specific calculation that I showed above. To give you more context, I added the following logs to the script:


    api.Data.Calculate("A#2A900A01:O#Top:I#None:F#CHI:U1#None:U2#None:U3#None:U4#None:U5#None:U6#External:U7#None:U8#None=A#3ABCDEF0:O#Top:I#Top:F#None:U1#TotProduct:U2#TotC2:U3#TotMarket:U4#TotC4:U5#TotCostCenter:U6#External:U7#None:U8#None")

    test = api.data.getdatacell("A#3ABCDEF0:O#Top:I#Top:F#None:U1#TotProduct:U2#TotC2:U3#TotMarket:U4#TotC4:U5#TotCostCenter:U6#External:U7#None:U8#None")
    test2 = api.data.getdatacell("A#2A900A01:O#Top:I#None:F#CHI:U1#None:U2#None:U3#None:U4#None:U5#None:U6#External:U7#None:U8#None")
    BRApi.ErrorLog.LogMessage(si,"3ABCDEF0: " & test.ToString)
    BRApi.ErrorLog.LogMessage(si,"2A900A01: " & test2.ToString)

    the POV in the calculation (first row) and POVs within the logs are the same. If the calculation worked fine, I would expect to see the same value assigned to both accounts. Nevertheless, while the log related to the account 3ABCDEF0 return the correct value, the log related to the account 2A900A01 returns 0, which means that the initial formula is not working for some reason

    • Henning's avatar
      Henning
      Valued Contributor II

      My intention is to help you to dissect the calculation in a way that you spot where it goes the wrong way. Usually in such cases, one member is wrong (not in the constraint, no input, etc.). Setting up a cube view helps as it provides a quick entry point for the analysis.

      This one will not work, because O#Top cannot be a target:

      api.Data.Calculate("A#2A900A01:O#Top:I#None:F#CHI:U1#None:U2#None:U3#None:U4#None:U5#None:U6#External:U7#None:U8#None=A#3ABCDEF0:O#Top:I#Top:F#None:U1#TotProduct:U2#TotC2:U3#TotMarket:U4#TotC4:U5#TotCostCenter:U6#External:U7#None:U8#None")

      Try O#Forms, and then try it in a cube view as well to verify you can enter data into that exact POV selection manually. Once you confirmed that, you can try writing (i.e. calculating) data there as previously described.

  • Hi fc,

    How is this calculation triggered?

    You said when the consolidation process is launched which would make me believe it is either a member formula on account 2A900A01 or a Finance Business Rule attached to the cube. Both of these options are a part of the Data Unit Calculation Sequence (DUCS).

  • fc's avatar
    fc
    New Contributor III

    Hi both,

    to answer to NBolinger question, it is indeed a Finance Business Rule.
    I have an update tho, the calculation seems to be working fine if I select a base Entity, but it does not consolidate the result to the parent entities.

    I created a cube view and the amount is correctly shown for the account 2A900A01 when selecting a base Entity, but the same POV does not show any value when selecting a parent entity after launching the consolidation process. What's strange is that the consolidation process works fine for all the other accounts in the hierarchy, whom show the correct value both at base entity and parent entity level.

    So the problem seems to be this specific account. I checked the settings and everything seems fine, the IsConsolidated flag is flagged and the other settings are in line with the rest of the accounts.

    I really struggle to understand what is causing this issue, if you have any idea please let me know!

    Thank you

    • NBolinger's avatar
      NBolinger
      Contributor

      Does your calculation have checks to only run on base entities? If not, the calculation would be running on parent entities as well which could lead to a zero calculation instead of consolidating the children as intended.

  • fc's avatar
    fc
    New Contributor III

    Hi NBolinger,

    sorry for not coming back to you.

    In the end we figured out that some ClearCalculatedData and CalculatedData functionalities were misplaced in the rule, which prevented us to run the whole process correctly. 

    Thank you anyway for the help!