Metrics

Administration > Maintenance > Metrics

The Metrics module provides real-time information for individual users, cost centers or any other structure of WorkPlace.  Metrics allows for the creation of custom designed metrics to the WorkPlace application and the ability to determine which metric(s) are allowed for which users based on Security setup at the User or Role level.

Document Toolbar

New

delete

Duplicate

save

Entry Fields

Caption

Enter an appropriate identification for the metric you wish to create. This name will appear as the name of the metric on the Dashboard.

Show Legend

When checked a legend will appear along with the metric when supported by the Chart Type.

Chart Type

Select a value from the drop down list to define how the metric will be displayed.  The Chart Type will dictate the Options available for the Metric.

Module

Select from the drop down list to indicate the placement on the Role/Security access tabs under which you wish it to appear and the Dashboard tab it will appear in addition to the Home and Metrics tabs.  Once the Metric has been created within WorkPlace it will be necessary to navigate to the appropriate Role(s) or User Login in WorkPlace security to grant access to the metric(s).

Example

Once all required information has been entered for the Metric, a preview will be displayed upon save.  The heading will display based on the Chart Type value selected (i.e. Example Chart, Example Meter or Example Table).

Options

Configuration options that are available will be displayed upon save depending on the Chart Type selected for the Metric.

Chart Properties

The Chart Properties tab will only be displayed when the Chart Type selected is not Meter or Table to provide additional personalization options for the chart display.

Legend Title

Optionally enter an appropriate identification the legend when the 'Show Legend' checkbox is checked for charts.  This option is not available for Doughnut and Pie Chart types which include a dynamic Legend with no title.

Background Color

This is an optional field that provides the ability to assign a specific set of colors for each of the data elements in a chart.  This value can be left blank to indicate that the Metric will be rendered using the default settings for background colors, border colors and border width with no additional configuration required.  This is the recommended configuration for ease of deployment, support for charts where the number of data elements is not fixed and to ensure color palette consistency for the Dashboard.  

Multiple colors can be assigned to the Background Color property by entering them in RGBA format separated by the backtick or grave accent symbol (`) for the expected number of data elements that will be displayed.  The following example will present a chart with the specified colors for the first 4 chart elements;

rgba(255,99,132,0.2)`rgba(54,162, 235,0.2)`rgba(255,206,86,0.2)`rgba(75,192,192,0.2)

 

RGBA color values are an extension of Red, Green, Blue color values with the final number representing the alpha channel that specifies the opacity of the color on a scale of 0 for fully transparent to 1 for completely opaque.

The number of values specified and how the colors will be used will be based on the Chart Type selected.  When assigning to a Pie, Doughnut or Polar Area Chart Type, the Background Color should include colors for each of the possible values or 'slices' that will be displayed.

Background Colors for graphical Chart Types (i.e. Bar, Horizontal Bar, Line, Radar and Scatter) are specified for each data series that is represented by a Query in the SQL Data Query section below.  The number of colors included in the Background Color property (when specified) should match the number of Queries used for the Metric.

Border Color

This value is available to enter the color(s) for the chart element borders in the RGBA format described above when a value Background Color value has been specified.  When the Background Color has not been set, this field is not required as the border colors will default based on the background when the chart is rendered.

Border Width

Enter the width for all chart element borders when a value has been specified for the Background Color.  Enter a value of zero (0) if no borders should be displayed.  When the metric is configured to be rendered using default settings (i.e., the Background Color is blank), this value is not required and will be ignored.

Primary Background Color

Type in color that will be the primary back color for your chart. Example: Black, White, Red, etc...

Secondary BackColor

Type in color that will be the secondary back color for your chart. Example: Black, White, Red, etc...

Gradient

Select from the drop down list to define in what direction the Primary BackColor and Secondary BackColor will be displayed.

Label Style

Select from the drop down list to indicate where the labels for the returned values should be display. For example, in a Pie Chart if you want the labels outside of the pie you would select "Outside".

Point Width

Select from the drop down list to indicate the width of the image for the returned value. For example, if the image is a bar increase the point width to make the bar wider.

3D Point Depth

Enter a numeric value to increase or decrease the depth of the image for the returned value.

For example, if the image is a bar input a higher number to increase the depth of the bar.  *This is used in conjunction with the "Show as 3D" checkbox option.

3D Point Gap Depth

Enter a numeric value to increase or decrease the depth of the plot area.

For example, if the chart type is Column input a higher number to increase the depth of the plot area.  *This is used in conjunction with the "Show as 3D" checkbox option.

3D Inclination

Enter a numeric value to increase or decrease the inclination of the plot area.

For example, if the chart type is Column input a higher number to increase the inclination of the plot area.  *This is used in conjunction with the "Show as 3D" checkbox option.

Legend Docking

Select from the drop down list to indicate where the Legend should be display. *This is used in conjunction with the "Show Legend" checkbox option.  

Legend Alignment

Select from the drop down list to indicate where the Legend should be display. *This is used in conjunction with the "Show Legend" checkbox option.  

Collect Slices

Select "true" from the drop down list to indicate if the sections of a pie chart, for example, should be combined. If they should not be combined leave blank or select "false".

Collect Threshold (in %)

Enter a numeric value to specify the percentage that should be combined. *This is used in conjunction with the "Collect Slices" option when set to "true".  

Collect Label

Enter an appropriate identification to be displayed on the chart for the collected slices. *This is used in conjunction with the "Collect Slices" option when set to "true".  

Collect Legend Text

Enter an appropriate identification to be displayed on the Legend for the collected slices. *This is used in conjunction with the "Collect Slices" option when set to "true" and the "Show Legend" checkbox option.

SQL Data Query

Query #1

In order for a metric to display anything on the dashboard, at least one valid SQL Query will be required for all Chart Types.  This is the query that will be executed when the metric is loaded to display the resulting dataset to the user.  The required format for the Query will depend on the specified Chart Type of the Metric.

Meter:  Metrics with a Chart Type of Meter will display a single value on the Dashboard along with the Caption that can be used as a description or label.  The SQL format for this type of Metric should select only a single value to be displayed.  For example, the following query can be used to display the current count of active WorkPlace users in the current company.

SELECT COUNT (*) FROM WCSecurity WITH (NOLOCK) WHERE idfFlagActive =1

Table:  Selecting this type for the Metric will present a table or grid view of the data requested.  Any simple select query is supported and will be displayed on the dashboard using the column names as headings.  To optimize how the information is displayed, it is recommended to limit the number of columns and to specify column names that are more meaningful than the table column names may be.  The following example will present a list of WorkPlace Departments including the assigned ID, Descriptions and Active status;

SELECT idfDeptID AS [Department ID], idfDescription AS [Description], CASE idfFlagActive WHEN 1 THEN 'YES' ELSE 'NO' END AS [Active?] FROM WCDept WITH (NOLOCK)

Charts:  All other Chart Types (i.e. Bar, Line, Pie, etc.) will present the data in a graphical chart format.  These types of Metrics require the SQL Query to return the value and title for each axis of the chart that will presented on the dashboard and need to be entered in a specified format that includes the following 'columns' to be returned in the dataset;

Upon save, if any of the required columns above are not specified, an error will appear in the Example Chart section indicating the column(s) missing.  The following is an example of the SQL format using the existing 'Top 5 Vendors by YTD Purchases' standard Metric;

SELECT TOP 5 V.idfVendorID AS XVALUE,'Vendor ID' AS XTITLE, SUM(POH.idfAmtExtendedHome) AS YVALUE,'Purchases' AS YTITLE FROM vwPOHeaderCurrent POH WITH (NOLOCK) INNER JOIN dbo.APVendor V WITH (NOLOCK) ON POH.idfAPVendorKey = V.idfAPVendorKey GROUP BY V.idfVendorID ORDER BY SUM(POH.idfAmtExtendedHome) DESC

SELECT TOP 5 VENDORID AS XVALUE,'Vendor ID' AS XTITLE,AMBLDTYD AS YVALUE,'Purchases' AS YTITLE FROM dbo.PM00201 WITH (NOLOCK) ORDER BY AMBLDTYD DESC

Query #2 and #3

Two additional query strings are available to support charts with multiple datasets when the Chart Type is not set to Meter or Table.

Command Buttons

View Query Results

Select this command button to view the query results in a table format.

Clear Results

Select this command button to clear the query results returned.