Apama 10.15.3 | Building and Using Apama Dashboards | Dashboard Function Reference | Tabular Functions | Count Unique Values By Time
 
Count Unique Values By Time
Returns a table that lists unique values and their counts from a specified table, sorted by a specified number of specified date part Intervals. The Table must contain a time column and a value column. The returned table contains an interval column, a column for each unique value, and counts for number of intervals specified or for all data in the Table if the Number of Intervals is 0.
Arguments
The function has the following arguments:
*Table: Data table column whose values are to be counted.
*Date Parts Per Interval: Number of date parts in each interval by which the counts are to be sorted.
*Number Of Intervals: Number of intervals by which the counts are to be sorted.
*Date Part: Text string that specifies the date unit to use. Enter s, m, h, d, w, M, q, or y, for seconds, minutes, hours, days, weeks, months, quarters, or years.
*Date Format: Text string that specifies the format of the function result. Specify a pattern string suitable for use with the Java SimpleDateFormat class.
*Value List: Table column that specifies values for which a count is to be performed. If you do not supply this argument, counts are returned only for values present in Table. Use this argument to include rows in the returned table for values that are not always present in Table. If you specify this argument, the returned table includes a row for each specified value, even if the count for some values is 0.
*Restrict to Value List: Numerical value (0 or 1) that determines whether a count is performed only for values in Value List. If Restrict to Value List is set to 0, all unique values from the Table Column are included in the returned table. If Restrict to Value List is set to 1 and Value List is specified, only rows from the Value List are included.
*Use Column Names: Numerical value (0 or 1) that determines whether original column names are retained in the returned table. If Use Column Names is set to 1, original column names are retained. If set to 0, columns are given generic names (for example, Subtotal1 and Total1). Generic column names are useful when the data attachment for the Table argument uses a substitution that causes the column names to change when the substitution changes.
This function returns a table.