# Formula using constant to recalculate data in model in sim

Hi, in my scenario I need as part of the simulation modify constant which is a component of the node formula whereas the formula should recalculate every row in the dataset and compare it in the MAX fn:

SUM (

MAX (

EVERY_DATASET_ROW * NODE_CONSTANT_A,

NODE_CONSTANT_B

)

)

Currently the result I am getting is SUM ( EVERY_DATASET_ROW * NODE_CONSTANT_A ), which is incorrect. Any help appreciated.

Varoothini Answered question

Hi,

We tried to recreate your query using the following steps.

- Data node with row values for 12 periods, 2 constant nodes – A and B with values as 100 and 1000 respectively and a formula node
- Formula entered is as seen in the image

- ResultĀ of the formula:
- In valQ
- In Excel

The formula seems to be working in the above example.

If this doesn’t answer your question, please post an example with more information so that we can help you better.

Varoothini Answered question