Converting a Decimal Value into Whole Number Using Power Automate

Converting a Decimal Value into Whole Number Using Power Automate

When working with Power Automate, you may receive decimal values from Excel, SharePoint, Dataverse, APIs, or calculations. In many situations, business requirements demand whole numbers instead of decimal values.

Power Automate provides several built-in expressions that can convert decimal values into whole numbers based on your specific requirements.

Why Convert Decimals to Whole Numbers?

Using the int() Function

The int() function removes the decimal portion and returns only the integer value.

int(123.99)

Output:

123

Using the round() Function

The round() function rounds the number to the nearest whole number.

round(123.75,0)

Output:

124

Using the floor() Function

The floor() function always rounds down to the nearest whole number.

floor(123.99)

Output:

123

Using the ceiling() Function

The ceiling() function always rounds up to the nearest whole number.

ceiling(123.01)

Output:

124 Important: Choose the correct function based on business requirements. int() truncates decimals, round() rounds normally, floor() always rounds down, and ceiling() always rounds up.

Common Use Cases

Best Practices

Key Takeaways