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

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width30%

4. Drag and drop the Athelte Country Camp Region dimension and Invoiced Amount metric into the Columns list.

Column
width70%

Image Added

Label Field

Section
Column
width30%

To complete the master query, a label field is required. This will be used to identify the rows from the master query as "Invoiced" rows. There will be a similar calculation in the union query to identify rows as "Cost".

5. Click on the + to create a calculated field, in the bottom of the View Fields List panel.

Column
width70%

Image Added

Section
Column
width30%

6. Set the Calculated Field Name to Label
Note: the name for this field can be anything, it will not change the way the union works if it's called something else.

7. Type Invoiced into the text box under the main calculation panel, as shown here, and click + Add to add it to the calculation.

Column
width70%

Image Added

Section
Column
width30%

8. Click the Validate button to ensure your calculation is built correctly.

9. Click the Save button to complete your calculation.

Column
width70%

Image Added

Section
Column
width30%

10. Drag and drop the Image Removed Year dimension into the Filters listthe Label calculation to between the Camp Region and Sum Invoiced Amount fields in either the Columns list or Table Preview.

Column
width70%

Image RemovedImage Added

Union Query

Styleclass
ClasstopLink

top

...

Section
Column
width30%

6. Click on the + button in the Sub Query panel to the left of the Data step to add a Sub Query.

7. Set the Type to Union and Style to Basic.

8. Click Ok to set up the query.

Column
width70%

Image Removed

...

Image Added

Calculations

To complete the union query, two calculations will be required;

  1. Label: this will be used to identify the rows from the union query as "Cost" rows. There will be a similar calculation in the master query to identify rows as "Invoiced".
  2. Cost: this will be used to convert the cost figure to a negative value. This will mean that when a sub total is added to the report, the cost amount will be subtracted from the invoiced amount.

Label

Section
Column
width30%

5. Click on the + to create a calculated field, in the bottom of the View Fields List panel.

Column
width70%

Image Added

Section
Column
width30%

6. Set the Calculated Field Name to Label
Note: the name for this field can be anything, it will not change the way the union works if it's called something else.

7. Type Cost into the text box under the main calculation panel, as shown here, and click + Add to add it to the calculation.

8. Click the Validate button to ensure your calculation is built correctly.

9. Click the Save button to complete your calculation.

Column
width70%

Image Added

Cost

Section
Column
width30%

5. Click on the + to create a calculated field, in the bottom of the View Fields List panel.

6. Set the Calculated Field Name to Cost
Note: the name for this field can be anything, it will not change the way the union works if it's called something else.

7. Click on the button.

x. Select the Camp Cost field from the -Select Field- drop down, and click + Add.

x. Close the bracket by clicking ).

x. Click the * button to multiply the field by a value.

x. Type -1 into the text entry field, and click + Add to put in your calculation.

8. Click the Validate button to ensure your calculation is built correctly.

9. Click the Save button to complete your calculation

The first thing you will need to define, when setting up a sub query, is the join type, and join fields.

9. Ensure the join type is Left Outer Join.

10. Select the Athlete Country field in the Master Query Fields drop down list. This is the field you wish to join the Sub Query to.

11. Drag the Athlete Country field in to the *Sub Query Fields box in order to join it to the Master Query.

Column
width70%

Image Removed

...

Image Added

Configure Union

Section
Column
width30%

1310. Change the name of Drag the Camp Region field into the Sub Query to Previous Year. This will later help identify the sub query, especially useful if you have multiple sub queries.14. Save the Sub QueryFields list, directly next to the Camp Region field in the Master Query Fields list.

10. Drag the Label calculated field into the Sub Query Fields list, directly next to the Label field in the Master Query Fields list.

10. Drag the Cost calculated field into the Sub Query Fields list, directly next to the Sum Invoiced Amount field in the Master Query Fields list.

    • Change the name of the Sub Query to Cost and click Save to complete the Union.
Column
width70%

Image RemovedImage Added

Edit Settings

Section
Column
width30%

16. If you need to make changes to your sub query setup at all, click the Edit Settings link.

Column
width70%

...