Advanced-excel-functions-advanced-excel-cube-cubeset-function
提供:Dev Guides
キューブ-CUBESET関数
説明
CUBESET関数は、セット式をサーバー上のキューブに送信し、セットを作成してからそのセットをMicrosoft Excelに返すことにより、計算されたメンバーまたはタプルのセットを定義します。
構文
引数
Argument | Description | Required/Optional |
---|---|---|
connection | Name of the connection to the cube. - A text string | Required |
set_expression |
A text string of a set expression that results in a set of members or tuples. OR セットに含まれる1つ以上のメンバー、タプル、またはセットを含むExcel範囲へのセル参照。 |
Required |
caption | A text string that is displayed in the cell instead of the caption, if one is defined, from the cube. | Optional |
sort_order | The type of sort, if any, to perform and can be one as given in the Table below. | Optional |
sort_by |
A text string of the value by which to sort. 例 売上が最も高い都市を取得するには、set_expressionが都市のセットになり、sort_byが販売メジャーになります。 最も人口の多い都市を取得するには、set_expressionが都市のセットになり、sort_byが人口測定になります。 sort_orderがsort_byを必要とし、sort_byが省略されている場合、CUBESETは#VALUE!を返します。 エラーメッセージ。 |
Optional |
sort_order引数が指定されている場合、実行するソートのタイプ-
Integer | Enumerated constant | Description | Argument - Sort_by |
---|---|---|---|
0 | SortNone | Leaves the set in existing order. | Ignored |
1 | SortAscending | Sorts set in ascending order by sort_by. | Required |
2 | SortDescending | Sorts set in descending order by sort_by. | Required |
3 | SortAlphaAscending | Sorts set in alpha ascending order. | Ignored |
4 | Sort_Alpha_Descending | Sorts set in alpha descending order. | Ignored |
5 | Sort_Natural_Ascending | Sorts set in natural ascending order. | Ignored |
6 | Sort_Natural_Descending | Sorts set in natural descending order. | Ignored |
デフォルト値は0です。 タプルセットのアルファソートは、各タプルの最後の要素でソートします。
ノート
- CUBESET関数が評価されると、すべてのデータが取得される前に、セルに「#GETTING_DATA…」メッセージが一時的に表示されます。
- 接続名がワークブックに保存されている有効なワークブック接続でない場合、CUBESETは#NAME? エラー値。 オンライン分析処理(OLAP)サーバーが実行されていない、利用できない、またはエラーメッセージを返す場合、CUBESETは#NAME?を返します。 エラー値。
- set_expression構文が正しくない場合、またはセットに他のメンバーとは異なるディメンションを持つ少なくとも1つのメンバーが含まれている場合、CUBESETは#N/Aエラー値を返します。
- set_expressionが関数への引数の制限である255文字より長い場合、CUBESETは#VALUE!を返します。 エラー値。 255文字より長いテキスト文字列を使用するには、セル(制限は32,767文字)にテキスト文字列を入力し、引数としてセル参照を使用します。
- 接続を共有するときにピボットテーブルで計算メンバーや名前付きセットなどのセッションベースのオブジェクトを参照し、そのピボットテーブルを削除するか、ピボットテーブルを数式に変換すると、CUBESETは#N/Aエラー値を返す場合があります。 ([オプション]タブの[ツール]グループで、[OLAPツール]をクリックし、[式に変換]をクリックします。)
適用範囲
Excel 2007、Excel 2010、Excel 2013、Excel 2016