Store Calculation not working

SimpleLove
New Contributor III

Hello OneStream experts:

I created and account=MyAccount and put member formula.

api.Data.Calculate("A#MyAccount = A#NETINC")

I set AccountType=Dynamic Calc Formula Type=Formula Pass 1

I am able to compile the syntax and run the calculation successfully. But MyAccount account member showing no data from my quick view excel sheet. My NETINC account has data. I wonder why the calculation is not working. Thank you for any feedbacks. 

1 ACCEPTED SOLUTION

MikeG
Contributor III

Hi @SimpleLove so a DynamicCalc does not store data.  It can not be assigned a Formula Pass and you can not use an api.data.Calculate() API call on a DynamicCalc account.  You have A#MyAccount as the destination for the calculation.  A DynamicCalc should have a Return Statement in which you are returning a value (or text or something).  Do you simply want to display the value of the A#NETINC account member?

If you want A#MyAccount to calculate and store a value - change the Account Type = Revenue, and change the Formula Pass to something like Pass 6 - not pass 1 where it may step on Flow member calcs.

View solution in original post

4 REPLIES 4

MikeG
Contributor III

Hi @SimpleLove a DynamicCalc does not store data, it is on-demand.  So it does not need a Formula Pass.  Try setting it like this:

MikeG_0-1716298645539.png

If the value is still not returning, check the rest of the POV and make sure you have data at that intersection.

 

SimpleLove
New Contributor III

I set both Account Type and Formula Type = DynamicCalc. Both MyAccount and NETINC have the same POV. I went to my MyAccount cell and click Force Calculate. However I do not see number in MyAccount. It seems the following member formula not working. Thank you advance for any good suggestion.

api.Data.Calculate("A#MyAccount = A#NETINC")

MikeG
Contributor III

Hi @SimpleLove so a DynamicCalc does not store data.  It can not be assigned a Formula Pass and you can not use an api.data.Calculate() API call on a DynamicCalc account.  You have A#MyAccount as the destination for the calculation.  A DynamicCalc should have a Return Statement in which you are returning a value (or text or something).  Do you simply want to display the value of the A#NETINC account member?

If you want A#MyAccount to calculate and store a value - change the Account Type = Revenue, and change the Formula Pass to something like Pass 6 - not pass 1 where it may step on Flow member calcs.

SimpleLove
New Contributor III

@MikeG Thank you so much for the help. It works now. I have tried to set Account Type  = Revenue, but I select formula type= Pass 1 and did not get data. I follow your suggestion and set it to Pass 6 and the calculation did work. It seems the formula type setting is so important. Thanks again.