Page tree


Contents:

NOTE:  Designer Cloud Educational is a free product with limitations on its features. Some features in the documentation do not apply to this product edition. See Product Limitations.

   

Returns the least common multiple shared by the first and second arguments.
  • Each argument can be a literal Integer number, a function returning an Integer, or a reference to a column containing Integer values.

Wrangle vs. SQL: This function is part of Wrangle, a proprietary data transformation language. Wrangle is not SQL. For more information, see Wrangle Language.

Basic Usage

lcm(10,4)

Output: Returns the least common multiple between values 10 and 4, which is 20

Syntax and Arguments

lcm(value1, value2)


ArgumentRequired?Data TypeDescription
value1YstringThe first value must be an Integer literal, column reference, or expression that evaluates to an Integer value.
value2YstringThe first value must be an Integer literal, column reference, or expression that evaluates to an Integer value.

For more information on syntax standards, see Language Documentation Syntax Notes.

value1, value2

Integer expressions, column references or literals to multiply together.

  • Missing or mismatched values generate missing string results. 

Usage Notes:

Required?Data TypeExample Value
YesLiteral, function, or column reference returning an Integer value15


Examples


Tip: For additional examples, see Common Tasks.

Example - Basic LCM function

Source:

stringrepeat_count
ha0
ha1
ha1.5
ha2
ha-2


Transformation:

Transformation Name New formula
Parameter: Formula type Single row formula
Parameter: Formula repeat(string, repeat_count)
Parameter: New column name 'repeat_string'

Results:

stringrepeat_countrepeat_string
ha0 
ha1ha
ha1.5 
ha2haha
ha-2 


 

This page has no comments.