GDP returns the min or max number of decimal places of entries made for the variable.
SYNTAX:
GDP(VarNum,GroupOffset/StartDate,Grouping/EndDate, Type, optional MinValue)
VarNum: The variable number to get the total for.
GroupOffset/StartDate: Used with the Grouping parameter to set the dates to calculate the stat for. Sets the number of Groups (set by the Grouping Parameter) to be added to set the dates. See examples below. If this field is a date string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the start date to calculate the stat for.
Grouping/EndDate: Used to set which dates to calculate the stat for. If the Grouping is a date literal string (i.e. "07/16/2004") or refers to a cell with a date in it, it is assumed to be the end date to calculate the stat for. Common Groupings are:
"D" Days
“M” Monthly
"R" Report Dates
Click here for available Grouping options
Type: Sets whether to return the minimum (Set to “Min”) or maximum (Set to “Max”) number of decimal places.
MinValue: Optional. A minimum value to return if there are no values or all values are entered with less decimal places than the MinValue
NOTES:
Used with variables with their decimal places set to 'Not Fixed'.
SEE ALSO: GPREC, SFRZ, SFR, DPC
EXAMPLES:
Example 1:
Date |
V1 |
1 |
2.7 |
2 |
23.1 |
3 |
9.23 |
GDP(1,1,”M”,”MIN”)=1
GDP(1,1,”M”,”MIN”,2) = 2 (MinValue set to 2)
GDP(1,1,”M”,”MIN”,0) = 1
GDP((1,1,”M”,”MAX”) = 2
Example 2:
Date |
V1 |
1 |
4.5 |
2 |
0.1234 |
3 |
1.755 |
GDP(2,1,”M”,”MIN”) = 1
GDP(2,1,”M”,”MAX”) = 4