Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Published by Scroll Versions from space DEV and version next

...

  1. From the column menu, select Column Details.
  2. .In the Column Details panel, select the Patterns tab.Among the patterns, select the following:

    Code Block
    {digit}.{digit}
  3. In the Suggestions panel on the right, locate the set transform suggestion Edit Column transformation suggestion that uses the ROUND function. Click Edit.
  4. Change the second parameter of the ROUND function 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:

D trans
Typestep
p01NameColumns
p01ValuecolA, colB, colC
p02NameFormula
p02ValueIFVALID($col, ['Float'], ROUND($col, 2))
SearchTermEdit column with formula

...

  1. In the data grid, select an instance of " kg". Note that the space should be selected, too.
  2. Among the suggestion cards, select the Replace card. 
  3. It should automatically choose to replace with nothing, effectively deleting the content. To check, click Modify
  4. The transform transformation should look like the following:

    D trans
    p03Value''
    Typestep
    p01NameColumn
    p01ValueWeight_kg
    p02NameFind
    p02Value' kg'
    p03NameReplace with
    p04Valuetrue
    p04NameMatch all occurrences
    SearchTermReplace text or patterns

  5. Add it to your recipe.
  6. Verify that the column's data type has been changed to Integer or Decimal, depending on the values in it.

...

  1. Select the first quote mark in one of the entries. 
  2. In the suggestion cards, select the Replace card.
  3. Select the variant that deletes all quotes in the column. 

  4. The full command should look like the following:

    D trans
    p03Value''
    Typestep
    p01NameColumn
    p01ValueHeight_ft
    p02NameFind
    p02Value`"`
    p03NameReplace with
    p04Valuetrue
    p04NameMatch all occurrences
    SearchTermReplace text or patterns

  5. Add it to your recipe.
  6. 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.
  7. Select the single quote mark, and choose the Split suggestion card. This transform transformation step should split the column into two columns: Height_ft1 and Height_ft2
  8. Derive the value in inches:

    D trans
    p03ValueHeight_in
    Typestep
    p01NameFormula type
    p01ValueSingle row formula
    p02NameFormula
    p02Value((Height_ft1 *12)+Height_ft2)
    p03NameNew column name
    SearchTermNew formula

  9. You can drop the other, interim columns.

...

You can use the following transforms transformations to perform rounding functions within these columns:

...

Info

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.

Info

NOTE: The above formatting option drops the zero for values like 4.0. As an alternative, you can use a format of '#.0', which always inserts a zero, even in cases where the zero is not present.

...

For more information, see Pivot TransformData.