question

Ankur A3 avatar image
0 Likes"
Ankur A3 asked Ankur A3 commented

How to link global table cell value to calculated table?

Hi Team,

I have to multiply my calculated table results by int variable which is defined in input global table?

I don't see any direct option available. Is there any way to do it?

Thank you!

FlexSim 20.0.10
calculated tablevariable
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

·
Logan Gold avatar image
0 Likes"
Logan Gold answered Ankur A3 commented

Depending on how you have your calculated table set up, you may be able to create a new Metric (or modify an existing Metric) in the Calculated Table Properties with the "Basic math operations" > "Operation on column and value" option:

calculatedtablemetric-mathoperation.png


Then, you can reference a global table (and probably other tables like statistics collectors) as the value:

calculatedtablemetric-mathoperationvalue.png


Or, if you want to directly edit the query in your calculated table, you can do this:

SELECT
   ([Column 1] * {Table("GlobalTable1")[1][1]}) AS [Metric 1]
FROM [DataSource]

Where anything between the curly brackets, { }, is assumed to be FlexScript that is executed when the query is called.

You could also create a second calculated table that uses the first calculated table as it's primary table and set up the same kind of metrics as above. But this will all depend on how you have your calculated table set up in your model. So if you can't get it to work and need more help, please attach an example model and/or give us some more details about your model.


· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

Ankur A3 avatar image Ankur A3 commented ·

Thank you so much @Logan Gold

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.