# 一般的な数値関数

これらの一般的な数値関数では、引数は数式であり、x は実際の数値と解釈されます。すべての関数は、データ ロード スクリプトおよびチャート式の両方で使用できます。

各関数のドロップダウンを使用すると、その関数の簡単な説明や構文を確認できます。詳細を表示するには、構文の説明にある関数名をクリックします。

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### bitcount

BitCount() は、10進数を 2 進数表記した場合に 1 に設定されるビット数を返します。つまり、この関数は integer\_number に設定されたビット数を返します。integer\_number は符号付きの 32 ビットの整数と解釈されます。

[**bitcount**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/bitcount.htm)(integer\_number)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### div

Div() は、1 番目の引数を 2 番目の引数で割り算して得られる整数部分を返します。パラメータは両方とも実数として解釈されるため、整数である必要はありません。

[**div**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/div.htm)(integer\_number1, integer\_number2)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### fabs

Fabs() は、x の絶対値を返します。結果は正の数値です。

[**fabs**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/fabs.htm)(x)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### fact

Fact() は、正の整数 x の階乗を返します。

[**fact**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/fact.htm)(x)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### frac

Frac() は、x の小数部を返します。

[**frac**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/frac.htm)(x)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### sign

Sign() は、x が正の数か 0、あるいは負の数かによって 1、0、-1 を返します。

[**sign**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/sign.htm)(x)

## 組み合わせ関数と順列関数

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### combin

Combin() は、p アイテムのセットから選択できる q 要素の組み合わせの数を返します。次の方程式で表されます:`Combin(p,q) = p! / q!(p-q)!` アイテムの選択順序に意味はありません。

[**combin**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/combin.htm)(p, q)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### permut

Permut() は、p アイテムのセットから選択できる q 順列の数を返します。次の方程式で表されます:`Permut(p,q) = (p)! / (p - q)!` アイテムの選択順序には有意性があります。

[**permut**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/permut.htm)(p, q)

## モジュロ関数

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### fmod

fmod()は、1 番目の引数 (被除数) を 2 番目の引数 (除数) で割り算して得られる整数部分を返す、一般化モジュロ関数です。結果は実数です。引数は両方とも実数として解釈されるため、整数である必要はありません。

[**fmod**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/fmod.htm)(a, b)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### mod

Mod() は、整数除算による負でない余りを返す、数学的モジュロ関数です。1 番目の引数 は被除数で、2 番目の引数は除数で、両方の引数とも整数でなければなりません。

[**mod**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/mod.htm)(integer\_number1, integer\_number2)

## パリティ関数

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### even

Even() はTrue (-1) を返します。これは、integer\_number が偶数の整数またはゼロの場合です。これが False (0) を返すのは integer\_number が奇数の整数である場合で、NULL を返すのは integer\_number が整数ではない場合です。

[**even**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/even.htm)(integer\_number)

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### odd

Odd() はTrue (-1) を返します。これは、integer\_number が奇数の整数またはゼロの場合です。これが False (0) を返すのは integer\_number が偶数の整数である場合で、NULL を返すのは integer\_number が整数ではない場合です。

[**odd**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/odd.htm)(integer\_number)

## 丸め関数

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### ceil

Ceil()は、step (offset によりシフト) に最も近い倍数に数値を切り上げます。

[**ceil**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/ceil.htm)(x[, step[, offset]])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### floor

Floor()は、step (offset によりシフト) に最も近い倍数に数値を切下げます。

[**floor**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/floor.htm)(x[, step[, offset]])

[](https://help.qlik.com/en-US/sense/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/general-numeric-functions-charts.htm)

#### round

Round() は、offset によりシフトされた step の最も近い倍数で切り上げた/切り下げた結果を返します。

[**round**](https://help.qlik.com/ja-JP/sense/May2025/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/GeneralNumericFunctions/round.htm)( x [ , step [ , offset ]])