question

dougdurbin avatar image
0 Likes"
dougdurbin asked dougdurbin commented

Sum label value by item type in process flow for dashboard

In my process flow I have an activity that I want to get a metric on. As the token flows through the activity I want to create a table chart in the dashboard to sum the labels. In my model, I have tokens that get assigned a label (PartNumber) that can be 1014, 1012, 1011, etc. and need to sum all like-labels that flow through that activity. The table chart should have each label (1014, 1012, 1011, etc) as column headers with the sum of how many tokens with that label passed through that activity in the row below. I've tried the statistics collector with an event listening to On Entry but am having a problem building the table that sums the labels and instead is listing out each entry. Is there a way to provide a quick example of how this is done?

FlexSim 21.0.1
labelchartsflexsim 21.0.1
· 2
5 |100000

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

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered dougdurbin commented

Example attached.

The row value should be data.token.PartNumber

The column PartNumber should be data.rowValue

The column Sum should be set to increment

The event needs to know that updates should affect the "Sum" column.

SumPartNumbers.fsm


sumpartnumbers.fsm (36.9 KiB)
· 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.

Joerg Vogel avatar image
1 Like"
Joerg Vogel answered

I assume the label value is the column name. You check if the column name exists in your collectors table. If the answer is true you increment the cell value otherwise you add a column to the table With cell value by 1.

Alternatively you push the label value to a global list which stores only unique values. The list should sum up the values.

5 |100000

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