List Metric widgets (Site List Metric and Workspace List Metric) display the aggregated value of one of the fields of SharePoint list items, like count of issues or average risks exposure. These widgets have the following parameters:
Parameter |
Description |
Site 1) |
Site URL to pull the data from |
List Query |
OData query that starts from a list name and determines items that will be displayed in the table. List Metric widget do not support $select option in OData queries. |
Function |
Function that will be applied to the Value column. |
Value |
Column name that the Function will be applied to. |
Format |
Column to display an item link. |
Show Subprojects 2) |
Determines whether Project Site widget should pull items from project sites of sub-projects or not. |
1) Is applicable only to Site List widget. Please see Site Parameter for details.
2) Is applicable only to Project Site List widget. Please see Show Subprojects Parameter for details.
Parameters
List Query
List Query is a parameter used to specify OData query. Query should be specified in a relative form, full URL will be determined automatically by the widget.
For example, provide the following as List Query to fetch a list of issues for calculating the aggregated value:
Issues
List Query parameter also accepts OData Query String Options, except the $select parameter.
For example, provide the following as List Query to calculate the aggregated value for issues that are active or postponed:
Issues?$filter=StatusValue eq '(1) Active' or StatusValue eq '(2) Postponed'
Function
Function is a parameter used to specify a function that will be applied to Value field. The following functions are vailable:
Function |
Description |
Count |
Calculates number of items |
Sum |
Calculates sum of the column specified in the Value parameter |
Avg |
Calculates average of the column specified in the Value parameter |
Min |
Returns minimum value from the column specified in the Value parameter |
Max |
Returns maximum value from the column specified in the Value parameter |
Value
Value is a parameter used to specify OData column name that contains a value to apply the aggregation function to.
Format
Format is a parameter used to specify formatting for the aggregated value.
Examples
Count of Active High Priority Issues
Parameter |
Value |
List Query |
Issues?$filter=substringof( 'high',PriorityValue) and substringof( 'active',StatusValue) |
Function |
Count |
Value |
Title |
Count of Active Overdue Issues
Parameter |
Value |
List Query | Issues?$filter=DueDate lt {Now} and substringof( 'active',StatusValue) |
Function |
Count |
Value | Title |
Average Impact of Active Risks
Parameter |
Value |
List Query |
Risks?$filter=substringof( 'active',StatusValue) |
Function |
Avg |
Value |
Impact |
Maximum Exposure of Active Overdue Risks
Parameter |
Value |
List Query |
Risks?$filter=DueDate lt {Now} and substringof( 'active',StatusValue) |
Function |
Max |
Value |
Exposure |