Home : VT
Q10718 - INFO: VT

VT returns the daily text value for a variable.  If the variable is setup to allow symbols (ie <, >, ND entries) or is a text parameter, VT will return the text value. 

SYNTAX:

VT(VarNum/Where Clause,Offset/Date, Optional Interval, Optional IntervalNum, Optional NoValuePrint, Optional Decimal Places)

VarNum/Where Clause:  Specifies the variable to get text value for.  Can be a variable number, a cell reference to a variable number or a Variable WHERE Clause.  

Offset/Date: If the field is numeric it is assumed to be the offset and is defined as the offset from the start date of the report.  For example, if the start date is 1/1/2000 and the offset is 1, the value from 1/1/2000 will be returned.  If the offset is 2, the value from 1/2/2000 will be returned and so forth.  If the field is a date in quotes or a cell reference to a cell containing a date the value for the date will be returned.  If the offset calculates a date beyond the end date of the report data will not be returned (use optional Interval and IntervalNum).  If the offset is 0 or negative it will calculate a date before the start date of the report and this function will return data before the start date.

Interval:  Used to retrieve data outside the report date range.  The interval sets whether to go back years (yyyy), months (m), etc…  The following are the valid settings for Interval

yyyy    Year
q         Quarter
m        Month
y         Day of year
D        Day
w        WeekDay
ww      Week

IntervalNum:  Used to retrieve data outside the report date range.  The interval number set the number of Intervals to go back. 

NoValuePrint:  Text or value to print if no value exists.  If set to "COMMENT", the result comment for the variable/date will be displayed if no value exists for the day.

Decimal Places:  Number of decimal places to display.

 

NOTES:

In Design, Spread Reports use Locate, Daily Values to place this formula on a report.

EXAMPLES:

VT(11,1) Returns the text value for variable 11 for the first day of the current month.    

VT(11,2,"M",1) Returns the text value for variable 11 for the second day of the previous month.

VT(11,0) Returns text value of 1 day before the start date of the report (e.g. if report start date is 1/1/2020, this would return the value for 12/31/2019)

VT(11,-1) Returns text value of 2 days before the start date of the report (e.g. if report start date is 1/1/2020, this would return the value for 12/30/2019)

VT(11,32) Returns blank as the report dates are set to 1/1/2020 through 12/31/2020 and the 32nd day would be Feb 1st which is greater than the end date.

VT(11,1,"No Demand",2) Returns the text value for variable 11 for the first day of the current month rounded to 2 decimal places. If there is no value, the text "No Demand " will be displayed.

VT(11,1,"COMMENT",2) Returns the text value for variable 11 for the first day of the current month rounded to 2 decimal places. If there is no value, the sample comment entered for the date/variable will be displayed.

VT(11,B5,3) Returns the text value for variable 11 for the date displayed in cell B5 rounded to 3 decimal places.

VT("LOCATION.PWSID='CELL(B2)' and NAME LIKE '%Total Coliform PA'",1) - Uses a Variable WHERE Clause to specify the variable.

 

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.
Created on 2/8/2008 10:53 AM.
Last Modified on 2/10/2023 9:03 AM.
Last Modified by Scott Dorner.
Article has been viewed 5922 times.
Rated 5 out of 10 based on 6 votes.
Print Article
Email Article