summing subscripts
Posted: Tue Jun 13, 2023 2:36 pm
Hi, I have an error in my model when I am trying to SUM a subscripted variable.
The attachment model.png shows the relevant part of the model structure.
The 'unscheduled procedures' variable in green is a data variable with a value for 2018 and 2022 imported via Model>>Import Dataset and it appears in the Advanced tab of the simulation control panel as a data source titled nonelective.vdfx
unscheduled procedures is arrayed by Trust,age,Unscheduled Primary Operation
The flow 'unscheduled entrances to cath lab' simply takes this as an input for the equation, and produces the results as in the attached file data2.png
When I try to sum the total across the array, using the equation: total unscheduled = SUM(unscheduled entrances to cath lab[Trust!, age!, Unscheduled Primary Operation!]) the model returns rubbish as displayed in the attachment data.png.
Whereas I can easily write a successful equation such as other_variable*unscheduled entrances to cath lab[Trust, age, unscheduled primary operation]
I've never had difficulty summing something before, is it perhaps related to how I've loaded the data?
Thank you,
Sarah
The attachment model.png shows the relevant part of the model structure.
The 'unscheduled procedures' variable in green is a data variable with a value for 2018 and 2022 imported via Model>>Import Dataset and it appears in the Advanced tab of the simulation control panel as a data source titled nonelective.vdfx
unscheduled procedures is arrayed by Trust,age,Unscheduled Primary Operation
The flow 'unscheduled entrances to cath lab' simply takes this as an input for the equation, and produces the results as in the attached file data2.png
When I try to sum the total across the array, using the equation: total unscheduled = SUM(unscheduled entrances to cath lab[Trust!, age!, Unscheduled Primary Operation!]) the model returns rubbish as displayed in the attachment data.png.
Whereas I can easily write a successful equation such as other_variable*unscheduled entrances to cath lab[Trust, age, unscheduled primary operation]
I've never had difficulty summing something before, is it perhaps related to how I've loaded the data?
Thank you,
Sarah