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

top

...

ページトップ

このチュートリアルでは、2年分の数値を比較するために追加サブクエリーを設定する処理を、段階的に説明します。

追加サブクエリーは、レポートのその他の部分とは異なるフィルターを必要とするカラム(列)をレポートに追加する場合に使用するものと考えるとよいでしょう。

このシナリオのメインレポートでは、2014年における国別の請求額を表示します。追加するカラム(列)は、2013年における請求額です。フィルターYear = 2014とYear = 2013が競合するため、追加を使用して別のカラム(列)を加える必要があります。

マスタークエリー

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

  1. Athlete Country
  2. Sum Invoiced Amount
  3. フィルター: Year = 2014

この場合、「Country」は2014年と2013年の共通フィールドであるため、追加を加えると結合が行われます。

注意:一部の国にはまだ2014年に対する結果が存在しないという理由などから、「Country」一覧を2014年でフィルタリングしたくない場合もあります。この場合は、マスタークエリーに「Country」を含め、それぞれの「Invoiced Amount」のために追加クエリーを使用します。

追加クエリー

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

  1. 結合:Athlete Country
  2. Sum Invoiced Amount
  3. フィルター:Year = 2013

この追加クエリーは、「Athlete Country」フィールドを使用してマスタークエリーに結合されます。クエリーはYear = 2013でフィルタリングされ、フィルター対象となる「Sum Invoiced Amount」フィールドのコピーがクエリーに組み込まれます。

初期化

Styleclass
ClasstopLink

ページトップ

Section
Column
width30%

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

Column
width70%

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%

Section
Column
width30%

3. Select ビューとして「Ski Team as the View.」を選択します。

Column
width70%

...

マスタークエリー

Styleclass
ClasstopLink

ページトップ

Section
Column
width30%

6. Drag and drop the 4. Athelte Country dimension and 」ディメンションおよび「 Invoiced Amount metric into the Columns list. 7. Drag and drop the Image Removed Year dimension into the Filters list. 」メトリックを「カラム(列)」にドラッグ&ドロップします。

5.Image Added Year 」ディメンションを「フィルター」にドラッグ&ドロップします。

Column
width70%

追加クエリー

Styleclass
ClasstopLink

ページトップ

追加サブクエリーの作成

Section
Column
width30%

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

9. Set the Type to Append, leaving the Style set to Basic for now.

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

7. 「タイプ」を「追加」に、「スタイル」を「基本」に設定します。

8.OK」をクリックしてクエリーを設定します。10. Click Submit.

Image Removed
Column
width70%

Image Added

追加サブクエリーの結合

Section
Column
width30%

サブクエリーを設定する際に最初に定義する必要があるのは、結合タイプと結合フィールドです。

9. 結合タイプを「左外部結合」に設定します。

10.マスタークエリーフィールド」のドロップダウンリストで、「Athlete Country」フィールドを選択します。このフィールドにサブクエリーを結合します。

11.Athlete Country」フィールドを*「サブクエリーフィールド」ボックスにドラッグして、マスタークエリーに結合します。11. Now drag in the same fields as the master query. The difference between the two queries will be set up using filter values.

Column
width70%

Image Added

フィルター

Image Removed
Section

...

styleclass
Column
width
ClasstopLink

top

Create Append

Join Append

Filters

...

30%

12.Year」フィールドを「サブクエリーフィルター」ボックスに追加します。このフィルターは、サブクエリーの結果を制限するためにのみ使用されます。

Column
width70%

Image Added

名前&保存

Section
Column
width30%

13. サブクエリーの名前をPrevious Yearに変更します。このように変更しておくと、あとでサブクエリーを識別する場合(特に、複数のサブクエリーが存在する場合)に役立ちます。

14. サブクエリーを保存します。1. Click on the Refresh link in the Joins area (on the sub query tab) to load the child fields you just added.

Image Removed
Column
width70%

Image Added

カラムの追加

Section
Column
width30%

2. Set both the Master and Child fields to Athlete Country, select a join operator, and click the Add Join button to save. 15.Image Added Invoiced Amount 」メトリックを「カラム(列)」にドラッグ&ドロップします。

Column
width70%

Image AddedImage Removed

設定の編集

Section
Column
width30%

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

3. You should now have a join that looks like the one pictured.

4. Click on the Image Removed at the top of the page to progress to the next step (filters).

Column
width70%

Image RemovedImage Added

...

フィルターの適用

Styleclass
ClasstopLink

topページトップ

Section
Column
width30%

1. To set the Master Query Filter click on the Image Removed Filter Prompt image. This will load a list of filter values.17. サブクエリーの準備が整ったら、ページの左側にある「サブクエリー」パネルで「マスタークエリー」をクリックして戻ります。

Column
width70%

Image RemovedImage Added

Section
Column
width30%

2. In the Filter Values window select 2010 and click on the Submit link to load the filter.18.フィルター」パネルで「設定」リンクをクリックします。これにより、すべてのフィルターについてのロジックおよび値を設定することができます。

Column
width70%

Image AddedImage Removed

マスターフィルター

Section
Column
width30%

3. You should now have the Master Query Filter set, as shown here. 19.マスタークエリー」フィルターを「Year 等しい(=) 2014」となるように設定します。

Column
width70%

Image RemovedImage Added

Section
Column
width30%

20.2014」を選択して「送信・実行」をクリックします。

4. To set the Sub Query Filter, follow the same steps as above, this time selecting 2009 as the value.

5. You can now click on the Image Removed at the top of the page to view your report.

Column
width70%

Image Removed

See Filters for more information.

Customisation

Styleclass
ClasstopLink

top

Image Added

サブクエリーフィルター

Section
Column
width30%

1. You should now have a report that looks like the one pictured here. To make it easier to read you are going add some formatting to it. 21.Previous Year」タブをクリックして、サブクエリーフィルターに移動します。

Column
width70%

Image RemovedImage Added

Section
Column
width30%

2. Click on the Columns link at the top of the page.22. フィルターパネルの「x」をクリックしてパネルを閉じます。レポートビルダーを終了するための「X」をクリックしないようにしてください。

Image Removed
Column
width70%

Image Added

書式

Styleclass
ClasstopLink

ページトップ

Section
Column
width30%

323. Select the 最初の「Sum Invoiced Amount Column from the dropdown.」フィールドのドロップダウンリストをクリックして、「書式」を選択します。

Column
width70%

Image RemovedImage Added

Section
Column
width30%

24.表示」の名前をInvoiced 2014に変更します。このように変更しておくと、ユーザーがクエリーを区別する場合に手掛かりとして役立つため、重要です。

Column
width70%

Image Added

Section
Column
width30%

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

26. 名前をInvoiced 2013と設定して、メニューを閉じます。

4. Click on the Display Menu.

5. Change the Display Name to Invoiced 2010.

6. Click on Close.

7. Repeat these steps for the Sub Query: Sum Invoiced Amount column, this time setting the Display Name to Invoiced 2009.

Image Removed
Column
width70%

Image Added

保存

Styleclass
ClasstopLink

ページトップ

Section
Column
width30%

8. You should now have a report that looks like the one pictured here. The columns are clearly labelled to make it easier to read the data.27.レポート」>「保存」をクリックして、レポートを有効化します。

Column
width70%

Image RemovedImage Added

Section
Column
width30%

9. You are now finished with this report. Click on the Report Menu and select Save.

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

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

1230. Select Tutorial as the Category.

13. Select Advanced Reporting as the Sub Category.

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

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

32.有効化」をクリックして終了します。14. Click Save to finish.

Column
width70%

Image Removed

See Formatting for more information.

Image Added

Section
Column
width30%

33. これで、追加サブクエリーレポートが作成できました。

Column
width70%

Image Added



horizontalrule
Styleclass
ClasstopLink

topページトップ