# Ceil

Ceil() 會將 x 向上捨入至最近的 step [+ offset] 的倍數。 offset 的預設值為 0。

相較於向下捨入輸入數字的 floor 函數。

語法：

Ceil(x[, step[, offset]])

傳回的資料類型： 整數

範例與結果：

* Ceil( 2.4 )：傳回 3
* Ceil( 2.6 )：傳回 3
* Ceil( 3.88 , 0.1 )：傳回 3.9
* Ceil( 3.88 , 5 )：傳回 5
* Ceil( 1.1 , 1 )：傳回 2
* Ceil( 1.1 , 1 , 0.5 )：傳回 1.5
* Ceil( 1.1 , 1 , -0.01 )：傳回 1.99

## 瞭解更多資訊

* [Floor](https://help.qlik.com/zh-TW/qlikview/May2024/Subsystems/Client/Content/QV_QlikView/ChartFunctions/GeneralNumericFunctions/floor.htm)