How to draw frequency of waiting times?

mhosseini457NG
Advocate Advocate
1 View
1 Reply
Message 1 of 2

How to draw frequency of waiting times?

mhosseini457NG
Advocate
Advocate

[ FlexSim 22.0.0 ]

Hi there,

How we can visualize/calculate the frequency of waiting times for multiple locations?

@Felix Möhlmann

0 Likes
Accepted solutions (1)
2 Views
1 Reply
Reply (1)
Message 2 of 2

moehlmann_fe
New Member
New Member
Accepted solution

Thank you for posting this as a follow up question - link for context:

https://answers.flexsim.com/questions/112485/frequency-of-the-chart-data.html?childToView=112858#com...

The data in the person and location tables does not contain a column that specifies the group they belong to so they have to joined with the "LocationGroups" table that does.

Then you can query for entries of any of the groups by adding the condition that the location must belong to it.

waittimescalctable-2.fsm

SELECT
(([PersonWaitForLocationHistory.StatisticsCollector].[AcquireTime] - [PersonWaitForLocationHistory.StatisticsCollector].[RequestTime]) / 60) AS [WaitTime]
FROM [PersonWaitForLocationHistory.StatisticsCollector]
JOIN [LocationGroups.StatisticsCollector] ON ([LocationGroups.StatisticsCollector].[Location] = [PersonWaitForLocationHistory.StatisticsCollector].[Location])
WHERE [LocationGroups.StatisticsCollector].[LocationsGroup1] = 1

This query calculates the individual waiting times patient had for locations (the result of this is normally aggregated in the "Location" column of the PersonWaitTimes table). It then joins the table with the "LocationGroups" table, adding the columns which determine if a location belongs to a certain location-group or not. Lastly the WHERE filters for entries belonging to the group with the specified name.

0 Likes

Type a product name