Custom Variables (Virtual Variables)

Similar documents
9 Using Equation Networks

Methods CSC 121 Fall 2014 Howard Rosenthal

CSI31 Lecture 5. Topics: 3.1 Numeric Data Types 3.2 Using the Math Library 3.3 Accumulating Results: Factorial

Ordinary Differential Equation Solver Language (ODESL) Reference Manual

Product Price Formula extension for Magento2. User Guide

Methods CSC 121 Spring 2017 Howard Rosenthal

Goals for This Lecture:

Introduction to Python, Cplex and Gurobi

Methods CSC 121 Fall 2016 Howard Rosenthal

Introduction to Programming

Sketchify Tutorial Properties and Variables. sketchify.sf.net Željko Obrenović

Engineering Problem Solving with C++, Etter/Ingber

Introduction to Engineering gii

6-1 (Function). (Function) !*+!"#!, Function Description Example. natural logarithm of x (base e) rounds x to smallest integer not less than x

Lesson #3. Variables, Operators, and Expressions. 3. Variables, Operators and Expressions - Copyright Denis Hamelin - Ryerson University

CT 229 Java Syntax Continued

C++ Overview. Chapter 1. Chapter 2

Excel Functions INTRODUCTION COUNT AND COUNTIF FUNCTIONS

XQ: An XML Query Language Language Reference Manual

Data Types and Basic Calculation

Chapter 4: Basic C Operators

WHOLE NUMBER AND DECIMAL OPERATIONS

TABLE 2: Mathematics College Readiness Standards for Score Range 13 15

Programming in QBasic

Introduction to Computer Programming in Python Dr. William C. Bulko. Data Types

Maths Functions User Manual

Arithmetic. 2.2.l Basic Arithmetic Operations. 2.2 Arithmetic 37

Python Programming: An Introduction to Computer Science

Functions and Inverses ID1050 Quantitative & Qualitative Reasoning

USER-DEFINED ELEMENT IN ZMAN TM

Microsoft Excel 2010 Handout

C++ Programming Lecture 11 Functions Part I

I/A Series Software Spreadsheet

PROGRAMMING WITH MATLAB DR. AHMET AKBULUT

Quick MATLAB Syntax Guide

Introduction to MATLAB

MYSQL NUMERIC FUNCTIONS

Outline. CSE 1570 Interacting with MATLAB. Starting MATLAB. Outline (Cont d) MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An

Workbook Also called a spreadsheet, the Workbook is a unique file created by Excel. Title bar

Chapter 2. Outline. Simple C++ Programs

Outline. CSE 1570 Interacting with MATLAB. Starting MATLAB. Outline. MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An.

MATELECT PDsoft v1.00

Introduction to MATLAB

Using Basic Formulas 4

MobileCoach ISRII Handout

Operations. Making Things Happen

Exercise 4.1. Create New Variables in a Shapefile. GIS Techniques for Monitoring and Evaluation of HIV/AIDS and Related Programs

Prentice Hall Algebra Correlated to: ACT College Readiness Standards for Mathematics

CP122 Computer Science I. Chapter 3: Methods/Functions

TECH TIP VISION Calibration and Data Acquisition Software

The Very Basics of the R Interpreter

Lecture 14. Daily Puzzle. Math in C. Rearrange the letters of eleven plus two to make this mathematical statement true. Eleven plus two =?

Limnor Studio User s Guide

Python Lists: Example 1: >>> items=["apple", "orange",100,25.5] >>> items[0] 'apple' >>> 3*items[:2]

Calculations with Sig Figs

Standard Value Calculation with CAPP (PP-BD-CAP)

Macro Programming Reference Guide. Copyright 2005 Scott Martinez

Introduction to PartSim and Matlab

Program Workspace. Why numerical methods? Problem examples Why programming? Why numerical methods and programming? Why VBA?

Extending Ninox with NX

Phụ lục 2. Bởi: Khoa CNTT ĐHSP KT Hưng Yên. Returns the absolute value of a number.

Matlab Programming Introduction 1 2

(Type your answer in radians. Round to the nearest hundredth as needed.)

Summer Assignment Glossary

The Number object. to set specific number types (like integer, short, In JavaScript all numbers are 64bit floating point

Chapter 1 Introduction to MATLAB

Operators Functions Order of Operations Mixed Mode Arithmetic VOID Data. Syntax and type conventions Using the Script window interface

Accelerated Life Testing Module Accelerated Life Testing - Overview

Expressions and operators

Consider this m file that creates a file that you can load data into called rain.txt

Integer Operations. Summer Packet 7 th into 8 th grade 1. Name = = = = = 6.

SUM - This says to add together cells F28 through F35. Notice that it will show your result is

To be able to count up and down in tenths

Rev Name Date. . Round-off error is the answer to the question How wrong is the rounded answer?

Process Optimization

Level 4 means that I can

Grade 4 ISTEP+ T1 #1-2 ISTEP+ T1 # Identify, describe and draw parallelograms, rhombuses, and ISTEP+ T1 #5-6

Mathematics Year 9-11 Skills and Knowledge Checklist. Name: Class: Set : Premier Date Year 9 MEG :

EXCEL 2007 TIP SHEET. Dialog Box Launcher these allow you to access additional features associated with a specific Group of buttons within a Ribbon.

Summer Packet 7 th into 8 th grade. Name. Integer Operations = 2. (-7)(6)(-4) = = = = 6.

INTRODUCTION TO WEB DEVELOPMENT AND HTML. Lecture 15: JavaScript loops, Objects, Events - Spring 2011

6.1 Evaluate Roots and Rational Exponents

Fundamentals of Programming & Procedural Programming

ANSI C Programming Simple Programs

Math 3 Coordinate Geometry Part 2 Graphing Solutions

Mathematics Year 9-11 Skills and Knowledge Checklist. Name: Class: Set : 1 Date Year 9 MEG :

Fraction to Percents Change the fraction to a decimal (see above) and then change the decimal to a percent (see above).

Introduction to Matlab

Chapter 3. Computer Science & Engineering 155E Computer Science I: Systems Engineering Focus. Existing Information.

CHAPTER 4: MICROSOFT OFFICE: EXCEL 2010

Outline. CSE 1570 Interacting with MATLAB. Outline. Starting MATLAB. MATLAB Windows. MATLAB Desktop Window. Instructor: Aijun An.

Standardized Tests: Best Practices for the TI-Nspire CX

9-1 GCSE Maths. GCSE Mathematics has a Foundation tier (Grades 1 5) and a Higher tier (Grades 4 9).

Introduction to MATLAB

PARRENTHORN HIGH SCHOOL Mathematics Department. YEAR 11 GCSE PREPARATION Revision Booklet

Bil 104 Intiroduction To Scientific And Engineering Computing. Lecture 5. Playing with Data Modifiers and Math Functions Getting Controls

STATISTICAL TECHNIQUES. Interpreting Basic Statistical Values

Today Function. Note: If you want to retrieve the date and time that the computer is set to, use the =NOW() function.

PART 1 PROGRAMMING WITH MATHLAB

Gloucester County Library System EXCEL 2007

Transcription:

Page 1 of 7 Custom Variables (Virtual Variables) Allocate not only allows you to select standard variables, but also allows you to create your own unique demographic variables. You may create new variables (Virtual Variables) using any combination of licensed variables or previously created virtual variables. To do so, from the Variables tab, select Add Virtual Variable from the file drop down menu. This will open the Create Formula box. Add/Edit Virtual Variables Variable Properties Variable Location Using Virtual Variables Add or Edit Virtual Variables Formulas A formula is the calculation that your new variable is made up of. The operators available are +, -, *, and /. They are for addition, subtraction, multiplication and division respectively. Allocate also includes boolean operators. There are also parenthesis available for building formulas ( and ). Allocate processes mathematical formulas by the standard rules, specifically multiplication, division and anything inside of parentheses first, and then addition and subtraction from left to right. Mathematical functions may also be performed. Variable names may not be changed, but you may add numbers. For instance to create a percentage, you may type * 100. Spaces are not necessary inside of your formulas. Your formula can be made of existing Allocate variables or of new variables that have been previously created inside of your Custom Formulas file. Here is an example of a formula created to find out the percentage of the American Indian population compared to the Total Population: RACCYAMIND/POPCY*100. Where RACCYAMIND equals American Indian Population for the Current Year and POPCY equals Total Population for the CY, and to create a percentage you would multiply the fraction times 100. There is no limit to the amount of operations you can have inside of your formula. Create Formulas The Add or Edit Virtual Variable selections will bring up the Create Formula dialog box. Input Variables include all of the licensed variables you are able to select (those that have a gray square grid next to their name) in addition to any previously created Virtual Variables. Select variables by highlighting them and clicking insert. For operators you may highlight them and click Insert or type them manually. This will place your variable into the formula bar in the last place you had your cursor. Once your variable is inside of the Formula bar, you are able to click on the Next button to complete the variable creation process. You may type your own variable or but you cannot change an existing

Page 2 of 7 variable name. You may delete variables by highlighting them in the Formula bar and hitting the delete button. Advanced Formula Options If you are creating custom variables and you have an entire folder that you would like to create the same formula for (for example, if you would like to calculate the value for each individual variable for Age as a percentage of Total Population), instead of highlighting each individual variable, highlight the folder that the variables are contained in and select Insert from the Variables tab - F. Complete your formula as if it were a single calculation and name your variable. When you name your variable, it may be helpful to name it after the folder itself. Allocate will add a unique identifier to each individual Custom Variable name. Then use either Index or Select. This will create an individual formula and individual name for each variable inside of the folder that you have selected. Functions A function is a mathematical relation between at least two variable quantities where one of them is dependent upon the others for its values. Allocate provides these functions: Name ABS(x) ATAN(x) BOUND(x,min, max) CEIL(x) COS(x) FLOOR(x) GETVAL(index,v1...,vn) IIF(bool,x,y) INDEX(v) INDEXVALUE(x,y) LEFT(x.len) LENGTH(x) LOG(x) LOG10(x) LOWERCASE(x) MAX(v1,v2...vn)* MAXIDX (v1,v2...vn) MIN(v1,v2...vn) MINIDX(v1,v2...vn) POW(x,e) Description Absolute Value of (x) Arc Tangent of (x) If (x) < (min) return (min); else if (x) > (max); else return (x). Return smallest integer greater than or equal to (x) Cosine of (x) Return largest integer less than or equal to (x) Returns the value(v1..vn) specified by the 0-based index. If (bool) is true, return (x); else return (y) Returns the index of the expression (v). Returns the index value of the expression (v). Return the first (len) characters of the string (x) Return the length of the string (x) Natural logarithm of (x) Base 10 logarithm of (x) Converts a string to lower case. The value for the variable with the highest count is returned from a series of variables. Returns the index of the maximum value from the list. Returns the minimum value from the list Returns the index of the minimum value from the list Return (x) raised to the (e) power Calculates the median from a series of aggregate ranges. See RANGEMEDIAN documentation for detail. Return the string (x) after replacing each occurrence of the character RIGHT(x,y,z) ith the character (z) (y) w RIGHT(x,len) ROUND(s, mult) SIN(x) SMARTROUND(x) Return the last (len) characters of the string (x) Return (x) nearest multiple of (mult) Sine of (x) Return (x) nearest multiple of a value determined

Page 3 of 7 dynamically based on the size of (x) SQRT(x) STRCSPN(x,y) STRIPQUOTES(x) SUBSTRING(x,start,len) TAN(x) TONUMBER(x) TOPNIDX(N, v1, v2,..., vn)(x) TOSTRING(x,numDec) TRIM(x,y) TRIMLEFT(x,y) TRIMRIGHT(x,y) UPPERCASE (x) Square Root of (x) Return the length of the initial segment of the string (x) consisting of characters not in the string (y) Remove quotation marks from the ends of the strings Return the substring of (x) starting at (start) stopping after (len), if provided Tangent of x Converts a sting pattern to a number. Returns the Nth from the maximum value from the list. With N==1, it is the same as MaxIdx(..) Converts a numeric parameter to a string using (numdec) decimal places. Remove characters in the string y from the ends of string x. Defaults to trimming white space. Remove characters in the string y from the beginning of string x. Defaults to trimming white space. Remove characters in the string y from the end of string x. Defaults to trimming whitespace. Converts a string to upper case Variable Properties After inputting your formula and clicking Next from the Create Formula box, the Variable Properties box appears. This box allows you to uniquely name, describe, make indexable, and/or provide units to each Custom Variable that you create. Name- This is the pneumonic descriptor name that you will name your new variable. Depending on your selected Output, you may have to follow rules specific to your database. For instance, if you are

Page 4 of 7 creating a.dbf file, the variable name may be no longer than 10 characters made up solely of alphanumeric characters (letters and numbers) with no spaces (underscores are acceptable). Description - The Description is the Plain English version of what you would like to call your new variable. What you enter in this field is what will appear on the Variables tab, so make sure this is something that you will recognize. Units- The Units drop down allows you to control how the values for your new variable will be displayed when you output them. Acceptable Unit options include Dollars, Integers, and Percentages. Units Description Fractional or Whole No. Dollars Dollars. Whole Dollars in (000's) Dollars already divided by $1,000 Whole Dollars Round Dollars that will be rounded for storage to 1,000 $1,000. Whole Dollars64 Numbers up to 2 to the 64th power (values will be displayed w/'$') Whole Dollars2_64 Same as above, but with change (values will Fractional be displayed w/'$') Fixed1_32 Numbers up to 2 32 /2, 1 decimal place Fractional Fixed2_32 Numbers up to 2 32 /2, 2 decimal places Fractional Fixed3_32 Numbers up to 2 32 /2, 3 decimal places Fractional Fixed4_32 Numbers up to 2 32 /2, 4 decimal places Fractional Fixed5_32 Numbers up to 2 32 /2, 5 decimal places Fractional Fixed6_32 Numbers up to 2 32 /2, 6 decimal places Fractional Fixed2_64 Numbers up to 2 64 /2, 1 decimal place Fractional Fixed4_64 Numbers up to 2 64 /4, 2 decimal places Fractional Fixed6_64 Numbers up to 2 64 /6, 3 decimal places Fractional Households Number of households Whole Index Indexed value.indexed value. Whole Integer Integer. Whole Integer64 Numbers up to 2 64 Whole Persons Average number of people (2.42 children) Fractional with 2 decimal places Physical2 Square miles. 2 digits of precision. Fractional with 2 decimal places Population Number of people. Whole Percent Percentage. Round 10 Input number magnitude may exceed MAX_LONG. Input will be nearest 10. Handles numbers up to up to 20 billion. On retrieval will have a zero in the 10's 10's place. Allocate stores all input numbers as long, so we need to lose a place of accuracy

Page 5 of 7 Round 100 Round 1,000 Round 10,000 to store numbers greater than MAX_LONG (2 billion). Same as Round 10, handles numbers to 200 billion and rounds last two digits to zero Same as Round 10, handles numbers to 2,000 billion and rounds last three digits to zero Same as Round 10, handles numbers to 20,000 billion and rounds last four digits to zero. Strings smaller than 256 characters 100's 1,000's 10,000's String Text Years Years, ex. Age. Whole Indexable - If your new variable is a calculation (average, percent, median) you can check the Indexable box. This enables the Indexing functionality on this variable. Save Variable - This next step is optional. If you do not check the Save Variable box, your variable will automatically be added to the Temporary Variables folder. If you do opt to save a variable, a Virtual Variable File (.vvf) will be added permanently and may be shared amongst other users. In the Save Variables box, Click the New button and choose a name for your.vvf (internal and external). The external name will be the one you would look for to send to someone else, or to remove. The internal name should be recognizable so that you can add additional variables to this file if you want to. Variable Location and Hierarchy After clicking on Next from the Variable Properties box, you will be asked to Select the location of the new variable(s) in the variable hierarchy so they will be easy to find in the tree structure for future use. Once you save it, the next time you start up Allocate and go to the Variables tab, your new variable will appear in the custom folder you created, or inside an existing folder structure you selected. New Category - The Category is the main folder that your new variable will be placed inside of. If you are including a new variable inside of an existing Category folder, make sure that the spelling is correct and that it is in the same case as the existing folder. Click the New Category button. You will be prompted to enter a folder name. New folder names can be edited later if you need to. You are also able to save new variables into the existing folder structure. Simply navigate to the folder where you want the variable saved and place it within the correct vintage and even sub-category. New Vintage - After you have created your folder, click the New Vintage button. Every variable needs to have an associated vintage. Common examples of this include Months, Quarters, or Current Year. The vintage will break your variable up into the correct year for your SubCategory. Vintage options are Current Year Estimates, Five Year Projections, or US Census. These are just suggestions, you may use another descriptive name to group your variables by year.

Page 6 of 7 New Subcategory - The SubCategory is a folder inside of the main Category folder. This allows you to position your new variables within the tree hierarchy below other folders. Using Virtual Variables After you have created your Custom Variable, you may bring over to your Output Fields Window by pressing either Index or Select. Index - Select Index if you are comparing your new Custom Variable to an Index Base and you have selected an Index Base on the Output Tab. Create your variable and name it and then press the Index button to create it as an Indexed Variable. Your variable will be moved to the Output Fields Window with an I next to it. Select - Use Select if you would just like to see the numerical value of your calculation in your Output. Allocate will calculate your formula and produce the results inside of your Output selection. The Select button will move your Custom Variable to the Output Fields Window. Your custom variable now appears in the Input Variables window. This variable will now be available every time you go into Allocate. Virtual Variables that you have created inside of Allocate can be removed at anytime simply by deleting them. You can delete or edit your custom variables by highlighting the variable you want to modify or get rid of and clicking on the appropriate selection from the File menu drop down. Custom Variables that you have created inside of your Custom Formula file can be removed at anytime simply by deleting them from your Custom Formula file. Edit Virtual Variables Allocate allows you to modify your variables. To change your formula or the variable name, just click on the Custom Variable you would like to work with and select Edit Virtual Variable from the File drop down. Make any changes you need to and select Index or Select again then finish. The existing variable is updated and overwritten with the changes. Clear Temporary Variables This button will clear everything that you have created inside of the Formula box and the New Variable name box. If you have already brought your Custom Variable to the Output Fields Window, this will not delete the variable, this will only clear the Formula and Name Variable boxes. Delete Virtual Variables With this command, you may select virtual variables you no longer need, and then go to Delete Virtual Variables in the File drop down to permanently delete them. Create Custom Variables from demox Files Users may capture, count, list records directly from their source files based on filtering criteria that they create from fields in the source files via the Import Customer Data option from the Variables -> File -> drop down.

Page 7 of 7 Alteryx, Inc * 230 Commerce* Suite 250 * Irvine, CA * 92602 * Telephone: (714) 516-2400 www.alteryx.com