- From the column menu, select Column Details.
.In the Column Details panel, select the Patterns tab.Among the patterns, select the following:
- In the Suggestions panel on the right, locate the
settransform suggestion Edit Column transformation suggestion that uses the
ROUNDfunction. Click Edit.
- Change the second parameter of the
ROUNDfunction to match the number of digits of precision.
You can generalize this formatting across multiple columns by applying the
$col reference in the transformtransformation's functions function, as in the following:
- In the data grid, select an instance of " kg". Note that the space should be selected, too.
- Among the suggestion cards, select the Replace card.
- It should automatically choose to replace with nothing, effectively deleting the content. To check, click Modify.
The transform transformation should look like the following:
D trans p03Value '' Type step p01Name Column p01Value Weight_kg p02Name Find p02Value ' kg' p03Name Replace with p04Value true p04Name Match all occurrences SearchTerm Replace text or patterns
- Add it to your recipe.
- Verify that the column's data type has been changed to
Decimal, depending on the values in it.
- Select the first quote mark in one of the entries.
- In the suggestion cards, select the Replace card.
Select the variant that deletes all quotes in the column.
The full command should look like the following:
D trans p03Value '' Type step p01Name Column p01Value Height_ft p02Name Find p02Value `"` p03Name Replace with p04Value true p04Name Match all occurrences SearchTerm Replace text or patterns
- Add it to your recipe.
- The remaining steps compute the number of inches. Multiply the feet by 12, and then add the number of inches, using new columns of data.
- Select the single quote mark, and choose the Split suggestion card. This transform transformation step should split the column into two columns:
Derive the value in inches:
D trans p03Value Height_in Type step p01Name Formula type p01Value Single row formula p02Name Formula p02Value ((Height_ft1 *12)+Height_ft2) p03Name New column name SearchTerm New formula
- You can drop the other, interim columns.
You can use the following transforms transformations to perform rounding functions within these columns:
NOTE: The above assumes that the number of significant digits remains fixed in the source data. If this varies over times or uses of the transform in your recipe, you might need to revisit these specific transform transformation steps.
NOTE: The above formatting option drops the zero for values like