30日間の無料評価版をお試しいただけます。

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

Anchor
top
top

...

Table of Contents
classcontents

はじめに

Styleclass
ClasstopLink

ページトップ

このチュートリアルでは、結合サブクエリーの設定を段階的に説明します。結合は、同じまたは異なるビューやソースから、複数のフィールドを1つのカラム(列)に組み合わせる必要がある場合に使用するものと考えるとよいでしょう。

このシナリオのメインレポートでは、地域別の請求額の一覧を設定します。次に、結合クエリーを使用して同じカラム(列)内にある負のコスト数値を表示した後、小計を追加して地域ごとの合計収入を確認します。

マスタークエリー

マスタークエリーには以下の項目を含めます:

  1. Camp Region
  2. 計算フィールド: "Invoiced" テキストラベル
  3. Sum Invoiced Amount

結合クエリー

結合クエリーには以下の項目を含めます:

  1. Camp Region
  2. 計算フィールド:"Cost" テキストラベル
  3. 計算フィールド:Sum Cost × -1 (コスト数値を負の値に変換します)

初期化

Styleclass
ClasstopLink

topページトップ

Section
Column
width30%

1. Click on the Create link and select Report to begin building your report. 作成」リンクをクリックして、「レポート」を選択しレポートの作成を開始します。

Column
width70%

Image Removed Image Added

Section
Column
width30%

2. You should now be on the Initialise Report page. Select the Drag and Drop Builder as the build tool. 「レポートの初期化」ページが表示されます。作成ツールとして「ドラッグ&ドロップで作成」を選択します。

Column
width70%

Image Removed Image Added

Section
Column
width30%

3. Select ビューとして「Ski Team as the View.4. Now click the Image Removed button to proceed.」を選択します。

Image Removed
Column
width70%

Image Added

マスタークエリー

Styleclass
ClasstopLink

ページトップ

Section
Column
width30%

5. Drag and drop the Image Removed Athlete Country dimension and Image Removed Invoiced Amount metric into the Column Fields area. 4.Image Added Camp Region 」ディメンションおよび「 Image Added Invoiced Amount 」メトリックを「カラム(列)」にドラッグ&ドロップします。

Image Removed
Column
width70%

Image Added

ラベルフィールド

マスタークエリーを完了するには、ラベルフィールドが必要となります。このフィールドは、マスタークエリーのロウ(行)を"Invoiced"ロウ(行)として識別するために使用されます。結合クエリーで同様の計算が行われ、"Cost"としてロウ(行)が識別されます。

Section
Column
width30%

6. Tick the checkbox next to Sub Queries to enable them. There should now be a Sub Query link at the top of the page. 5. ビューフィールド一覧パネルの下部で「+」をクリックし、計算フィールドを作成します。

Column
width70%

Image RemovedImage Added

Section
Column
width30%

6.計算フィールド名」をLabelに設定します。
注意:このフィールドの名前は任意です。名前が変更されても結合の処理方法は変更されません

7. ここで示すように、メイン計算パネルでテキストボックスにInvoicedと入力し、「+追加」をクリックして計算式に追加します。

7. Click on the Sub Query link. This will open the Sub Query Type menu.

8. Set the Type to Union.

9. Click Submit.

Column
width70%

Image RemovedImage Added

Section
Column
width30%

8.テスト」ボタンをクリックして、計算式が正しく作成されたことを確認します。

9.保存」ボタンをクリックして、計算式を完了します。10. You should now have a Master Query Tab and a Sub Query Tab. Click on the Master Query tab to setup the query.

Column
width70%

Image RemovedImage Added

Creating a Field Label

Section
Column
width30%

11. Click on the Add Calculated Fields Link at the bottom of the page to begin creating a calculated field. 10.カラム(列)」または「表のプレビュー」のどちらかで、計算フィールドの「Label」を、「Camp Region」と「Sum Invoiced Amount」のフィールドの間にドラッグします。

Image Removed
Column
width70%

Image Added

結合クエリー

Styleclass
ClasstopLink

ページトップ

結合の作成

Section
Column
width30%

11. 「データ」ステップの左側にある「サブクエリー」パネルで「+」ボタンをクリックし、サブクエリーを追加します。

12. Type Invoiced Amount in the textbox as shown. 「タイプ」を「結合」に、「スタイル」を「基本」に設定します。

13.OK」をクリックしてクエリーを設定します。

Column
width70%

Image Added

計算

結合クエリーを完了するには、2つの計算が必要となります:

  1. Label:結合クエリーのロウ(行)を"Cost"ロウ(行)として識別するために使用されます。マスタークエリーで同様の計算が行われ、"Invoiced"としてロウ(行)が識別されます。
  2. Cost:コスト数値を負の値に変換するために使用されます。つまり、小計がレポートに追加されると、コスト金額が請求金額から差し引かれます。

Label

Section
Column
width30%

14. ビューフィールド一覧パネルの下部で「+」をクリックし、計算フィールドを作成します。

13. Click on the Image Removed button to add the text to your formula.

14. 'Invoiced Amount' should now appear in the large text area. This will mean that the calculated field's value will be constant, used as a label in the report.

15. Set the Calculated Field Name to Label.

16. Click the Save link to finish.

Column
width70%

Image RemovedImage Added

Section
Column
width30%

15.計算フィールド名」をLabelに設定します。
注意:このフィールドの名前は任意です。名前が変更されても結合の処理方法は変更されません。

16. ここで示すように、メイン計算パネルでテキストボックスにCostと入力し、「+追加」をクリックして計算式に追加します。

17.テスト」ボタンをクリックして、計算式が正しく作成されたことを確認します。

18.保存」ボタンをクリックして、計算式を完了します。

17. Drag and drop the Image Removed Label Calculated Field into the Column Fields area.

18. Click on the Union tab.

Column
width70%

Image AddedImage Removed

Cost

Section
Column
width30%

19. Drag and drop the Image Removed Athlete Country dimension and Image Removed Profit Margin metric into the Child Fields area as shown. It is important to make sure the order matches up to the Master Fields so that the union works. . ビューフィールド一覧パネルの下部で「+」をクリックし、計算フィールドを作成します。

20.計算フィールド名」をCostに設定します。
注意:このフィールドの名前は任意です。名前が変更されても結合の処理方法は変更されません。

21. 」ボタンをクリックします。

22.フィールドを選択」ドロップダウンから「Camp Cost」フィールドを選択し、「+追加」をクリックします。

23.) 」をクリックしてカッコを閉じます。

24. 値でフィールドを乗算するには、「 * 」ボタンをクリックします。

25. テキスト入力フィールドに-1と入力して、「+追加」をクリックして計算式に追加します。

26.テスト」ボタンをクリックして、計算式が正しく作成されたことを確認します。

27.保存」ボタンをクリックして、計算式を完了します。

Column
width70%

Image AddedImage Removed

結合の設定

Section
Column
width30%

28.マスタークエリーフィールド」の「Camp Region」の横の「サブクエリーフィールド」に、「Camp Region」をドラッグします。

29.マスタークエリーフィールド」の「Label」の横の「サブクエリーフィールド」に、計算フィールドの「Label」をドラッグします。

30.マスタークエリーフィールド」の「Sum Invoiced Amount」の横の「サブクエリーフィールド」に、計算フィールドの「Cost」をドラッグします。

31. サブクエリーの名前をCostに変更して、「保存」をクリックして結合を完了します。

20. Click on the Add Calculated Field link as before. This time type Profit Margin and click Image Removed to add the text.

21. Set the Calculated Field Name to Label..

22. Click the Save link to finish.

Image Removed
Column
width70%

Image Added

設定の編集

Section
Column
width30%

32. 全体的にクエリー設定を変更する必要がある場合は、「設定の編集」リンクをクリックします。

23. Drag and drop the Image Removed Label Calculated Field into the Child Fields area as shown.

24. You can now click on the Image Removed at the top of the page to progress to the next step.

Column
width70%

Image RemovedImage Added

...

書式

Styleclass
ClasstopLink

topページトップ

Section
Column
width30%

1. You should now have a report that looks like the one pictured here.

2. To start, click on the Label column header and drag it so that it is moved between the Athlete County and Sum Invoiced Amount columns. 33.Sum Invoiced Amount」フィールドのドロップダウンリストをクリックして、「集約の合計」を適用します。

Column
width70%

Image RemovedImage Added

Section
Column
width30%

34.Camp Region」フィールドのドロップダウンリストをクリックして、「書式」を選択します。メインナビゲーションバーから、「カラム(列)の書式」メニューを選択することもできます。

35.重複表示の排除」オプションを有効化します。これにより、最終的な表に小計が組み込まれて、表がより読みやすくなります。3. Your report should now appear as pictured. Reordering the columns should make the information easier to read. Formatting will also help.

Column
width70%

Image RemovedImage Added

Section
Column
width30%

4. Click on the Columns link at the top of the page. 36.Camp Region」フィールドが表示されているときに、「サマリー」設定を開いて「小計」オプションを有効化します。

Column
width70%

Image RemovedImage Added

Section
Column
width30%

5. Select the 37.カラム(列)の書式」メニューが表示されているときに、左側の一覧から「Sum Invoiced Amount Column from the dropdown.」フィールドを選択します。

36. 名前をValueに設定します。

Column
width70%

Image RemovedImage Added

Section
Column
width30%

6. Click on the Display Menu.

7. Change the Display Name to Amount.

8. Click on Close.

38. メニューを閉じます。

Image Removed
Column
width70%

Image Added

保存

Styleclass
ClasstopLink

ページトップ

Section
Column
width30%

9. You should now have a report that looks like the one pictured here. 39.レポート」>「保存」をクリックして、レポートを有効化します。

Column
width70%

Image RemovedImage Added

Section
Column
width30%

10. You are now finished with this report. Click on the Save Menu.

11. Set the Name of your report to 40. レポートの名前Union Sub Query Tutorial.に設定します。

12. Set the Description to 41. 説明This report was written using the Sub Query Tutorial.に設定します。

1342. Select Tutorial as the Category.

14. Select Advanced Reporting as the Sub Category.

カテゴリーは「Tutorial」を選択します。

43. サブカテゴリーは「Training」を選択します。

44.有効化」をクリックして終了します。15. Click Activate to finish.

Column
width70%

Image Removed

...

Image Added

Section
Column
width30%

45. これで、結合サブクエリーレポートが作成できました。

Column
width70%

Image Added



horizontalrule
Styleclass
ClasstopLink

topページトップ