====== COUNTPATTERN() Function ====== The COUNTPATTERN() function can be used in a variety of ways to get the a pattern such as the number of times a value dips below or goes above a set threshold value for more than a certain period. Usage: ''COUNTPATTERN(variable, period, threshold,type,minutes)'' - see below for description. Parameters: variable - Variable name to use period - Type of period (see below) threshold - value to compare data points to type - 0 = below the threshold, 1 = above the threshold minutes = number of minutes the condition needs to be true for in order to pass the check ===== Generic Variables (per device type) ===== ''COUNTPATTERN('INC1_AMPS', 5, 2.5, 0, 5)'' Get the number of times INC1_AMPS drops below 2.5A for more than 5 minutes in selected period ===== Period Parameters ===== The second parameter, [period] is a number and can be any of the following |0 | latest value (Default) | |1 | DAY - Difference between start of day and latest value | |2 | WEEK - Difference between start of week and latest value | |3 | MONTH - Difference between start of month and latest value | |4 | YEAR - Difference between start of year and latest value | |5 | PERIOD - Difference between start and end of selected date range | |6 | AT_START_DATE - value at the start of the selected date range | |7 | AT_END_DATE - value at the end of the selected date range | |8 | PERIOD_CUMULATIVE - value between start of period and range element (in a graph) |