We can group any field in Workforce Analytics together by creating a new Calculated Field with a small amount of code.
We will use an example to show how to do this, however, this principle can be applied to other data sources and fields. This example shows how to group all the individual roles together into 2 sub-groups called SUPPORT STAFF and FRONT LINE.
Create a new Dashboard using the “Timesheet Data” Data source.
Add two columns, Role ID and ROLES. Ensure both columns are set to the DIMENSION type.
Add a third column and select Timesheet ID. Ensure it is a MEASURE and choose the summary type of COUNT.
If you don’t see any information, change the date range to a point in time where timesheets do exist. The results should similar to this:
We will now group the roles “Team Member” and “Ticket / Impulse Assistant” to FRONT LINE and the roles “Trade Support” and “Trade Manager” to SUPPORT STAFF. Note the ROLEID is unique for each Role, we will use ROLEID’s in the code below.
Create a new Calculated Field by clicking the f+ symbol above the field names.
The logic for the code is:
- The first IIF is a test to see if the ROLEID = 60 or 61. If this is true then call it FRONT LINE.
- However if the ROLE ID doesn’t match 60 or 61 it does a second test.
- The second IIF is testing if the ROLEID = 63 or 68. If this is true then called it SUPPORT STAFF.
- However if the ROLEID doesn’t match 63 or 68 it will return the current role name as a catch all feature.
The results should look similar to this:
Remove the RoleId and Role fields to see the number of timesheets grouped by the new calculated field called GROUPED TEAMS.
For more on Workforce Analytics refer to Workforce Analytics Overview