# レコード間関数

レコード間関数は、次のスクリプトと数式に使用します。

* データ ロード スクリプト (現在のレコードの評価に以前にロードされたデータのレコード値が必要な場合)
* チャート式 (ビジュアライゼーションのデータ セットからもう 1 つ値が必要な場合)

情報メモ

チャートの式いずれかにレコード間のチャート関数が使用されている場合、チャートの y 値のソート、またはテーブルの式列ごとのソートは許可されません。よって、これらのソート機能は自動的に無効になります。ビジュアライゼーションまたはテーブルでレコード間のチャート関数を使用すると、ビジュアライゼーションのソートは、レコード間の関数に対するソートされた入力の状態に戻ります。この制限は、同等のスクリプト関数 (ある場合) には当てはまりません。

情報メモ信頼性のある自己参照型数式の定義は、行数が 100 未満のテーブルでのみ作成可能ですが、これは Qlik エンジンが実行されているハードウェアによって変わる可能性があります。

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

## 行関数

これらの関数は、チャート式でのみ使用できます。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Above

Above() テーブルの列セグメント内の現在の行の上にある行の数式を評価します。どの行が計算されるかは、offset 値により決定されますが、デフォルトは真上の行です。テーブル以外のチャートでは、Above() は、チャートのストレート テーブルに相当するセグメントの現在の行よりも上にある行を評価します。

[**above**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/above.htm)([TOTAL [&lt;fld{,fld}&gt;]] expr [ , offset [,count]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Below

Below() テーブルの列セグメント内の現在の行の下にある行の数式を評価します。どの行が計算されるかは、offset 値により決定されますが、デフォルトは真下の行です。テーブル以外のチャートでは、Below() は、チャートのストレート テーブルに相当するセグメントの現在の行よりも下にある行を評価します。

[**below**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/below.htm)([TOTAL[&lt;fld{,fld}&gt;]] expression [ , offset [,count ]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Bottom

Bottom() テーブルの列セグメント内の最後 (最下部) の行の数式を評価します。どの行が計算されるかは、offset 値により決定されますが、デフォルトは最下部の行です。テーブル以外のチャートでは、評価はチャートのストレート テーブルに相当する現在の列の最後の行を評価します。

[**bottom**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/bottom.htm)([TOTAL[&lt;fld{,fld}&gt;]] expr [ , offset [,count ]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Top

Top() テーブルの列セグメント内の最初 (最上部) の行の数式を評価します。どの行が計算されるかは、offset 値により決定されますが、デフォルトは最上部の行です。テーブル以外のチャートでは、Top() 評価はチャートのストレート テーブルに相当する現在の列の最初の行を評価します。

[**top**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/top.htm)([TOTAL [&lt;fld{,fld}&gt;]] expr [ , offset [,count ]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### NoOfRows

NoOfRows() は、テーブルの現在の列セグメント内の行の数を返します。ビットマップ チャートの場合、NoOfRows() はチャートのストレート テーブルに相当するセグメントに含まれる行の数を返します。

[**noofrows**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/noofrows.htm)([TOTAL])

## 列関数

これらの関数は、チャート式でのみ使用できます。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Column

Column() は、軸に関係なく、ストレート テーブルで ColumnNo に対応する列の値を返します。例えば、Column(2) は 2 番目のメジャー列の値を返します。

[**column**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/column.htm)(ColumnNo)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Dimensionality

Dimensionality() 現在の行の軸の数を返します。ピボット テーブルの場合、この関数は、集計以外の内容 (部分合計または折りたたまれた集計を含まない) を含む軸列の合計数を返します。

[**dimensionality**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/dimensionality.htm) ( )

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Secondarydimensionality

SecondaryDimensionality() は、集計以外の内容 (部分合計または折りたたまれた集計を含まない) を含む軸のピボット テーブル行の数を返します。この関数は、水平ピボット テーブル軸の dimensionality() 関数に相当します。

[**secondarydimensionality**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/secondarydimensionality.htm) ( )

## 項目関数

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### FieldIndex

FieldIndex() は、field\_name 項目内の value 項目値の位置を返します (ロード順)。

[**fieldindex**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/fieldindex.htm)(field\_name , value)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### FieldValue

FieldValue() は、field\_name 項目の elem\_no の位置にある値を返します (ロード順)。

[**fieldvalue**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/fieldvalue.htm)(field\_name , elem\_no)

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### FieldValueCount

FieldValueCount() は integer 関数で、項目に含まれる固有値の数を返します。

[**fieldvaluecount**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/fieldvaluecount.htm)(field\_name)

## ピボット テーブル関数

これらの関数は、チャート式でのみ使用できます。

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### After

After() は、ピボット テーブルの行セグメント内の現在列の後の列に、ピボット テーブルの軸値で評価された expression の値を返します。

[**after**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/after.htm)([TOTAL] expression [ , offset [,n]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Before

Before() は、ピボット テーブルの行セグメント内の現在列の前の列に、ピボット テーブルの軸値で評価された expression の値を返します。

[**before**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/before.htm)([TOTAL] expression [ , offset [,n]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### First

First() は、ピボット テーブルの現在の行セグメントの最初の列に、ピボット テーブルの軸値で評価された expression の値を返します。ピボット テーブル以外のすべてのチャート タイプの場合、この関数は NULL を返します。

[**first**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/first.htm)([TOTAL] expression [ , offset [,n]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Last

Last() は、ピボット テーブルの現在の行セグメントの最後の列に、ピボット テーブルの軸値で評価された expression の値を返します。ピボット テーブル以外のすべてのチャート タイプの場合、この関数は NULL を返します。

[**last**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/last.htm)([TOTAL] expression [ , offset [,n]])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### ColumnNo

ColumnNo() は、ピボット テーブルの現在の行セグメント内の現在列の番号を返します。最初の列の番号は 1 です。

[**columnno**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/columnno.htm)([TOTAL])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### NoOfColumns

NoOfColumns() は、ピボット テーブルの現在の行セグメント内の列の数を返します。

[**noofcolumns**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/noofcolumns.htm)([TOTAL])

## データ ロード スクリプトのレコード間関数

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Exists

Exists() は、特定の項目値がデータ ロード スクリプトの項目にすでにロードされているかどうかを決定します。この関数は TRUE または FALSE を返すため、LOAD ステートメントまたは IF ステートメントの where 句で使用できます。

[**Exists**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFunctions/Exists.htm)(field\_name [, expr])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### LookUp

LookUp() は、すでにロードされているテーブルを参照し、項目 match\_field\_name における値 match\_field\_value の最初の出現に対応する field\_name の値を返します。テーブルは、現在のテーブルまたは前にロードして別のテーブルにできます。

[**LookUp**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFunctions/LookUp.htm)(field\_name, match\_field\_name, match\_field\_value [, table\_name])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Peek

Peek() は、すでにロードされている行に対してテーブルの項目値を返します。行番号は、テーブルと同様に指定できます。行番号が指定されていない場合は、最後にロードされたレコードが使用されます。

[**Peek**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFunctions/Peek.htm)(field\_name[, row\_no[, table\_name ] ])

[](https://help.qlik.com/en-US/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/InterRecordFunctions/inter-record-functions-charts.htm)

#### Previous

Previous()は、where節のために破棄されなかった以前の入力レコードのデータを使用して、expr数式の値を算出します。内部テーブルの最初のレコードの場合は、NULL を返します。

[**Previous**](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecordFunctions/Previous.htm)(expr)

## 詳細を見る

* [範囲関数](https://help.qlik.com/ja-JP/cloud-services/Subsystems/Hub/Content/Sense_Hub/ChartFunctions/RangeFunctions/RangeFunctionsInCharts.htm)