Signature: ROUND(number, decimals)
Returns: number
Description: Rounds a number to specified decimal places
Arguments:
Test References (9 found)
- math-functions.test.js (9 references)
- Line 12:
const result = evaluateFormula('ROUND(3.14159, 2)', testContext); - Line 18:
const result = evaluateFormula('ROUND(revenue, 0)', testContext); - Line 96:
const result = evaluateFormula('ROUND(ABS(revenue - cost) / MAX(revenue, cost) * 100, 2)', testContext); - Line 102:
const result = evaluateFormula('ROUND(revenue * 0.1, 2) + MIN(cost, 100)', testContext); - Line 108:
const result = evaluateFormula('STRING(ROUND(revenue, 2)) & " (max with cost: " & STRING(MAX(revenue, cost)) & ")"', testContext); - Line 115:
() => evaluateFormula('ROUND(3.14, "world")', testContext), - Line 160:
() => evaluateFormula('ROUND(MIN("a", "b"), ABS("c"))', testContext), - Line 171:
() => evaluateFormula('ROUND(3.14)', testContext), - Line 180:
() => evaluateFormula('ROUND("hello", 2)', testContext),
- Line 12:
Usage Examples (13 found)
-
examples/table/customer/budget_analysis.formula (1 reference)
- Line 1:
first_name & " " & last_name & " | Budget Range: $" & STRING(ROUND(budget_max - budget_min, 0)) & " | Flexibility: " & STRING(ROUND((budget_max - budget_min) / budget_min * 100, 0)) & "% | Avg Target: $" & STRING(ROUND((budget_min + budget_max) / 2, 0))
- Line 1:
-
examples/table/customer/contact_card.formula (1 reference)
- Line 1:
first_name & " " & last_name & " | " & email & " | " & phone & " | Budget: $" & STRING(ROUND(budget_min/1000, 0)) & "K-$" & STRING(ROUND(budget_max/1000, 0)) & "K | " & STRING(preferred_bedrooms) & "BR | " & UPPER(status) & " | " & assigned_rep_id_rel.name
- Line 1:
-
examples/table/customer/lead_score.formula (3 references)
-
examples/table/listing/luxury_indicator.formula (1 reference)
- Line 1:
IF(listing_price > 800000, "💎 LUXURY", IF(listing_price > 500000, "⭐ PREMIUM", IF(listing_price > 300000, "🏠 STANDARD", "💰 AFFORDABLE"))) & " | " & STRING(bedrooms) & "BR " & STRING(bathrooms) & "BA | " & STRING(ROUND(square_feet/1000, 1)) & "K sqft"
- Line 1:
-
examples/table/listing/market_analysis.formula (1 reference)
- Line 1:
address & " | Market Position: " & IF(days_on_market < 30, "🔥 HOT", IF(days_on_market < 60, "📈 NORMAL", IF(days_on_market < 90, "📊 SLOW", "❄️ STALE"))) & " | " & STRING(days_on_market) & " days | Price/sqft: $" & STRING(ROUND(listing_price/square_feet, 0)) & " | " & IF(ROUND(listing_price/square_feet, 0) > 200, "💰 PREMIUM", IF(ROUND(listing_price/square_feet, 0) > 150, "📊 MARKET", "💵 VALUE"))
- Line 1:
-
examples/table/listing/market_summary.formula (1 reference)
- Line 1:
address & " | $" & STRING(ROUND(listing_price/1000, 0)) & "K | " & STRING(bedrooms) & "bed/" & STRING(bathrooms) & "bath | " & STRING(ROUND(listing_price/square_feet, 0)) & "/sqft | " & STRING(days_on_market) & " days | " & UPPER(status)
- Line 1:
-
examples/table/listing/price_per_sqft.formula (1 reference)
- Line 1:
ROUND(listing_price / square_feet, 2)
- Line 1:
-
examples/table/opportunity/commission_projection.formula (1 reference)
- Line 1:
IF(stage = "closed", "✅ PAID: $" & STRING(ROUND(commission_total, 0)), "📊 PROJECTED: $" & STRING(ROUND(NULLVALUE(offer_amount, listing_id_rel.listing_price) * 0.06 * (probability / 100), 0))) & " | Reps: " & STRING(COUNT_AGG(rep_links_opportunity_id, rep_id))
- Line 1:
-
examples/table/opportunity/deal_summary.formula (1 reference)
- Line 1:
customer_id_rel.first_name & " " & customer_id_rel.last_name & " → " & listing_id_rel.address & " | " & UPPER(stage) & " | $" & STRING(ROUND(NULLVALUE(offer_amount, listing_id_rel.listing_price)/1000, 0)) & "K | " & STRING(probability) & "% | " & NULLVALUE(financing_type, "TBD")
- Line 1:
-
examples/table/rep/commission_summary.formula (1 reference)
- Line 1:
name & " | Earned: $" & STRING(ROUND(SUM_AGG(rep_links_rep_id, NULLVALUE(commission_amount, 0)), 0)) & " | Pending: $" & STRING(ROUND(SUM_AGG(rep_links_rep_id, IF(ISNULL(commission_amount), 50000 * commission_percentage / 100, 0)), 0)) & " | Deals: " & STRING(COUNT_AGG(rep_links_rep_id, id))
- Line 1:
-
examples/table/rep/performance_dashboard.formula (1 reference)
- Line 1:
name & " (" & region & ") | Goal: $" & STRING(ROUND(sales_goal/1000, 0)) & "K | Active Listings: " & STRING(COUNT_AGG(listings_listing_agent_id, id)) & " | Opportunities: " & STRING(COUNT_AGG(rep_links_rep_id, id)) & " | Rate: " & STRING(commission_rate * 100) & "%"
- Line 1:
Signature: ABS(number)
Returns: number
Description: Returns the absolute value of a number
Arguments:
number(number): Number to get absolute value of
Test References (7 found)
-
if-function.test.js (1 reference)
- Line 66:
const result = evaluateFormula('IF(ABS(revenue - cost) > 1000, "Large difference", "Small difference")', testContext);
- Line 66:
-
math-functions.test.js (6 references)
- Line 24:
const result = evaluateFormula('ABS(-25.5)', testContext); - Line 30:
const result = evaluateFormula('ABS(cost)', testContext); - Line 96:
const result = evaluateFormula('ROUND(ABS(revenue - cost) / MAX(revenue, cost) * 100, 2)', testContext); - Line 160:
() => evaluateFormula('ROUND(MIN("a", "b"), ABS("c"))', testContext), - Line 189:
() => evaluateFormula('ABS()', testContext), - Line 198:
() => evaluateFormula('ABS("hello")', testContext),
- Line 24:
Usage Examples (0 found)
No usage examples found for this function.
Signature: CEILING(number)
Returns: number
Description: Rounds a number up to the nearest integer
Arguments:
number(number): Number to round up
Test References (4 found)
- math-functions.test.js (4 references)
Usage Examples (0 found)
No usage examples found for this function.
Signature: FLOOR(number)
Returns: number
Description: Rounds a number down to the nearest integer
Arguments:
number(number): Number to round down
Test References (3 found)
Usage Examples (0 found)
No usage examples found for this function.
Signature: POWER(base, exponent)
Returns: number
Description: Raises a number to a power
Arguments:
Test References (0 found)
No test references found for this function.
Usage Examples (0 found)
No usage examples found for this function.
Signature: SQRT(value)
Returns: number
Description: Returns the square root of a number
Arguments:
value(number): Number to get square root of
Test References (0 found)
No test references found for this function.
Usage Examples (0 found)
No usage examples found for this function.
Signature: LOG(value)
Returns: number
Description: Returns the natural logarithm of a number
Arguments:
value(number): Number to get natural logarithm of
Test References (0 found)
No test references found for this function.
Usage Examples (0 found)
No usage examples found for this function.
Signature: LOG10(value)
Returns: number
Description: Returns the base-10 logarithm of a number
Arguments:
value(number): Number to get base-10 logarithm of
Test References (0 found)
No test references found for this function.
Usage Examples (0 found)
No usage examples found for this function.
Signature: EXP(value)
Returns: number
Description: Returns e raised to the power of a number
Arguments:
value(number): Exponent
Test References (0 found)
No test references found for this function.
Usage Examples (0 found)
No usage examples found for this function.
Signature: SIN(angle)
Returns: number
Description: Returns the sine of an angle in radians
Arguments:
angle(number): Angle in radians
Test References (0 found)
No test references found for this function.
Usage Examples (0 found)
No usage examples found for this function.
Signature: COS(angle)
Returns: number
Description: Returns the cosine of an angle in radians
Arguments:
angle(number): Angle in radians
Test References (0 found)
No test references found for this function.
Usage Examples (0 found)
No usage examples found for this function.
Signature: TAN(angle)
Returns: number
Description: Returns the tangent of an angle in radians
Arguments:
angle(number): Angle in radians
Test References (0 found)
No test references found for this function.
Usage Examples (0 found)
No usage examples found for this function.
Signature: RANDOM()
Returns: number
Description: Returns a random number between 0 and 1
Arguments: None
Test References (0 found)
No test references found for this function.
Usage Examples (0 found)
No usage examples found for this function.
Signature: MIN(num1, num2)
Returns: number
Description: Returns the minimum of two numbers
Arguments:
Test References (6 found)
- math-functions.test.js (6 references)
- Line 36:
const result = evaluateFormula('MIN(10, 20)', testContext); - Line 42:
const result = evaluateFormula('MIN(revenue, cost)', testContext); - Line 102:
const result = evaluateFormula('ROUND(revenue * 0.1, 2) + MIN(cost, 100)', testContext); - Line 160:
() => evaluateFormula('ROUND(MIN("a", "b"), ABS("c"))', testContext), - Line 207:
() => evaluateFormula('MIN(5)', testContext), - Line 216:
() => evaluateFormula('MIN("hello", "world")', testContext),
- Line 36:
Usage Examples (0 found)
No usage examples found for this function.
Signature: MAX(num1, num2)
Returns: number
Description: Returns the maximum of two numbers
Arguments:
Test References (5 found)
- math-functions.test.js (5 references)
- Line 48:
const result = evaluateFormula('MAX(15, 8)', testContext); - Line 54:
const result = evaluateFormula('MAX(revenue, cost)', testContext); - Line 96:
const result = evaluateFormula('ROUND(ABS(revenue - cost) / MAX(revenue, cost) * 100, 2)', testContext); - Line 108:
const result = evaluateFormula('STRING(ROUND(revenue, 2)) & " (max with cost: " & STRING(MAX(revenue, cost)) & ")"', testContext); - Line 124:
() => evaluateFormula('MAX(10, TODAY())', testContext),
- Line 48:
Usage Examples (0 found)
No usage examples found for this function.
Signature: MOD(dividend, divisor)
Returns: number
Description: Returns the remainder of division
Arguments:
Test References (4 found)
- math-functions.test.js (4 references)
Usage Examples (0 found)
No usage examples found for this function.
Signature: SIGN(value)
Returns: number
Description: Returns the sign of a number (-1, 0, or 1)
Arguments:
value(number): Number to get sign of
Test References (0 found)
No test references found for this function.
Usage Examples (0 found)
No usage examples found for this function.
Documentation generated on 2025-06-27T07:39:53.106Z