Use a Formula to Define an Attribute

Previous  Terms  Next

TinkerPlots_logoV2-rgb


Use a Formula to Define an Attribute

You can use formulas to compute values for an attribute. For example, in a collection on countries you might have the attributes Land_Area and Population. You could define a new attribute, Population_Density, by writing a formula that divides Population by Land_Area.

Note: Creating a formula for an existing attribute deletes any values currently in that attribute. First create a new attribute unless you want to replace your data with the calculated values.

To define an attribute using a formula,

hmtoggle_arrow1. . . in the Data Cards

1.

Enter the name of the new attribute into the <new attribute> cell at the bottom of the data cards.

2.

Double-click the circle in the Formula column. (If you can't see the Formula column, widen the data cards by dragging the right edge.)

3.

Enter the formula into the formula editor and click OK. (See Enter a Formula.)

When you've added a formula, the circle in the Formula column of your new attribute changes to blue, and the values of the attribute appear light gray rather than black. These changes remind you that the values of this attribute are computed with a formula.

hmtoggle_arrow1. . . in a Case Table

1.

Enter the name of the new attribute into the <new> cell, in the column head in the far right of the case table.

2.

Choose Show Formulas from the table's Options menu. A shaded row of formula cells appears.

Show formula in table

3.

Double-click the formula cell under the attribute you want to define by formula.

4.

Enter the formula into the formula editor and click OK. (See Enter a Formula.)

The computed values of the attribute appear light gray rather than black in the case table. This reminds you that the values of this attribute are computed with a formula. To see the entire formula in the formula row of the case table, you may need to make the cell taller or wider.


TinkerPlots Help

© 2012 Clifford Konold and Craig D. Miller