Sum across different shapes

Started by Ashok, November 15, 2010, 04:23:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ashok

Hi,

I have created a process diagram and included values for 'Duration' for each of the process steps. On the same diagram I would like to include a field to sum all the durations of the individual steps on that sheet. I can insert a formula to add indiviual shapes (e.g. =Process.78!Prop.Duration+Process.60!Prop.Duration) however I don't want to update the formula each time I add a new step. Is there a way to sum all shapes on a sheet to pull the total duration of a complete process?

Thanks,
Ashok

vojo

Assuming you dont want to use VBA

Use some user cells in the page.
Use some props cells and user cells in the given shapes

User cell keeps the running total

Props cells coordinates who goes when

In each shape....something like this in the shapes, key user cell...basically gives you the idea of the shape cells / page cells needed

     user.addminetothemix = If(props.mytimeslotid = thepage!user.timeslot, setf(getref(thepage!user.sum),user.sum+props.myslotvalue) + setf(getref(thepage!user.timeslot),thepage!user.timeslot+1),)

Probably need a shape to reset timeslot back to 0 / doubles as "recalculate" button...something like a shape or button with
     eventdbldclk = setf(getref(thepage.timeslot), 0)

I think this gives you the general idea

you may want to do things like step the mytimeslotid in increments of 10s so you can add shapes in the middle if you need to.
     

Browser ID: smf (is_webkit)
Templates: 4: index (default), Display (default), GenericControls (default), GenericControls (default).
Sub templates: 6: init, html_above, body_above, main, body_below, html_below.
Language files: 4: index+Modifications.english (default), Post.english (default), Editor.english (default), Drafts.english (default).
Style sheets: 4: index.css, attachments.css, jquery.sceditor.css, responsive.css.
Hooks called: 144 (show)
Files included: 34 - 1321KB. (show)
Memory used: 1080KB.
Tokens: post-login.
Cache hits: 12: 0.00195s for 26,581 bytes (show)
Cache misses: 1: (show)
Queries used: 14.

[Show Queries]