XPAC Reference Guide

Stockpile report with activity mapping walkthrough

Stockpile report with activity mapping walkthrough

Previous topic Next topic  

Stockpile report with activity mapping walkthrough

Previous topic Next topic  

Note

This walkthrough makes use of the Solomon's Gold Mine sample project, available with XPAC 7.12 and later versions. You may need to extract the sample project from a zip archive if you cannot find the project file. Remember to start with a clean version of the sample project.

This walkthrough describes how to create a simple stockpile report. The report makes use of activity mapping and is broken into four steps:

hmtoggle_arrow1Creating a new stockpile report from a sample database

To create a new stockpiles report from a sample database:

1.In the main XPAC window, either:
a.Select File > Open; or
b.Press Ctrl+O.
2.In the Windows Explorer window, navigate to the Sample Projects folder.
3.Select the Solomon's Gold Mine file and click Open.
4.Click Run Scenario on the Tools toolbar.
5.Select View > Analysis Reports. The Analysis Reports window displays.
6.Click New. The Choose the Report Type window displays.

Note

Do not select the existing report, Stockpile Report. This is the report you will check your report against when you finish the walkthrough.

7.Select Stockpiles Report and click OK. The Import Report Data window displays.
8.In the Database Fields tab, for each database tab that displays (for example, Main, Calendar), select data fields that you want to include in your report by selecting fields to Add and Remove as required from the Available data fields and Selected data fields lists.

Information

For the report you will produce in this walkthrough, you do not need to add any specific data field. All of the results will be driven by custom, activity mapped fields that you will create later. However, since XPAC does not let you create a blank report, you will need to select at least one field to proceed.
To extend this walkthrough, you can add any or all of the available data fields from either the Main or Calendar database tabs.
9.Click OK.

XPAC creates the report.

hmtoggle_arrow1Creating new measures that return different results, depending on the activity

Information

This walkthrough section creates two activity-mapped measures at once. You can create one at a time by clicking OK after adding each measure and returning to step one in this section each time.

To create new measures with mapped activities:

1.Click Import Report Data > Activity Mapping (see Activity mapping). The Activity Mapping window displays.
2.Map activities to new measures to produce a measure that returns different values (depending on which activity the measure is being used to describe):
a.Type Total Tonnage in the Measure Name field.
b.Select the appropriate field for each activity in the row (NAF, PAF, LGSul, HGSul, LGOx, HGOx), for example, for Total Tonnage, select NAF Tonnage in the NAF field and LG Oxide Tonnage in the LGOx field.

Information

Ensure you complete all activities (you may need to scroll to display the remainder of the activities).

3.Repeat steps a and b for Total Au Grade.

activity mapping for stockpiles

4.Do not change the Display Folder field.

Information

Note that the Aggregation Type column automatically populated when you mapped your first field. Aggregation Type displays the manner in which the fields in the other columns will be aggregated. XPAC updates the field in this column to reflect the aggregation type most appropriate for the most recent addition you made in the previous step. For example, quantity fields (for example, volume or area) would be added together to make the new measure; quality fields (for example, density or thickness) would be averaged (in this case, a weighted average).

5.Click Apply. XPAC updates the list of measures in the Measures pane. Expand the Custom folder to display the measures that you just created:
 
stockpiles measures
hmtoggle_arrow1Building a chart from these measures

To build your chart:

1.Drag & drop each Custom measure (Total Tonnage and Total Au Grade) from the Measures pane to the Data card.

Information

Note that the fields display the total of all tonnages and the weighted average of grades, across all activities. (You have not yet defined any activities). As a result, XPAC has aggregated each result according to the aggregation types of your custom measures.

XPAC has also added the Measures attribute to the Rows card.

2.Drag & drop the Inventory Type attribute from the Attributes pane the left of the Measures attribute already in the Rows shelf. You will need to expand the Attributes dimension in the Attributes pane to display the Inventory Type attribute:
 
stockpile measures - adding inventory type
 
The custom measures deliver different inventory types, depending on which activities are related to each inventory type. This will become more apparent after adding the Stockpile attribute in the next step.
3.Drag & drop the Stockpile attribute from the Attributes pane to the left of the Inventory Type attribute on the Rows shelf. You will need to expand the Attributes dimension to display the Stockpile hierarchy.

Note

Ensure you do not use the Stockpile level (which is part of the Destination hierarchy in the Main dimension).

stockpile report - adding stockpile

The chart now displays tonnage, and grade for all stockpiles, broken into the different inventory types and based on the total or weighted average of the data for each activity related to those inventory types.

4.Drag & drop the Top level of the Calendar hierarchy from the Attributes pane to the Columns shelf:
 
stockpiles report - adding calendar

Information

The data is now in place, but differentiation between activities is not clear. To make the results clearer, you can use a colour legend.

5.Drag & drop the Inventory Type attribute from the Attributes pane to the Color shelf on the Encodings card.
6.Type a title for the report in the Title card.
7.Click Save on the analysis reports toolbar.
8.Export the report to your preferred output format so that you can compare the report you just created against the saved report.
9.Close the current window.

Check your working against the Stockpile Report provided with the Solomon's Gold Mine sample project.

Note

If you close the report, next time you open it, XPAC opens the report in View mode. You will need to click Switch Designer Mode on the toolbar to get back to Design mode.

hmtoggle_arrow1Exploring different chart outputs

Creating an analysis report is much quicker and easier than using scripts or custom queries. Once created, you can manipulate the report even further to achieve the results you want. Try the following alterations to the report that you just created:

Remove the ActivityName attribute from the chart:
1.Drag & drop the ActivityName attribute in the Rows shelf back to the Attributes pane to remove it from the report.
2.Drag & drop the ResourceName attribute to the Rows shelf (to where the ActivityName attribute previously was).

Information

You will need to make the same change to the attribute you use as the Color on the Encoding card too, otherwise the chart will try to display all colours at once. The chart will show all of the activities that relate to each resource. For example, the Ore Miner Total Volume will include the total (remember, Total Volume was additive) of the volumes of all mapped activities related to the Ore Miner resource. This will not make much of a difference with the existing rows, because you mapped all the activities, so move to the next step.

Create a new activity map where you map only one of the activities (use a new name). Use the new measure in the table you have created, placing it on the Data card shelf next to the similar measure.
Add the Destination hierarchy to the chart by dragging & dropping the Destination hierarchy between the Source hierarchy and the ResourceName attribute on the Rows shelf. You can now see the movements between the Deposit and the Stockpiles showing totals for the activities you mapped.
Display movements without cluttering the chart rows by dragging & dropping the Destination hierarchy away from the Rows card and using it instead as a Color Encoding.
Display each individual activity by dragging & dropping the ActivityName attribute to the Pages card. XPAC splits the chart into a page for each activity. You can now use the Current Page control to switch between each activity.