Tracking Trend

From Explore Analytics: The Wiki
Jump to navigation Jump to search

Overview

Trend analysis is one of the most useful tools for understanding the current state of things and their outlook.

Tracking trend is useful for any calculated metric, such as inventory on hand, net worth, membership renewal rate, support backlog, top-10 list, and much more. Think for example how easy creating a burn-down chart becomes.

Burn-Down Chart

"Tracking Trend" is a name for a simple feature that makes it easy to trend data. It breaks the problem into three easy steps.

Step One

The first step is to create a view showing current information. For example, a pivot view could show the "% complete" by project, subproject and team as of the time of running the view. Selecting the project, subproject and team would allow you to create trend views at different levels, and you can implement drill-down in your trend view.

Note: beware of including ratios and average calculations in this view. Ratios and averages cannot simply be added together in a meaningful day. It is often a good idea to select the sum and the count of non-empty. Using these values you could later calculate ratios or averages at any level.

Step Two

The next step is to "Track Trend" on the view that was created in step one. To "Track Trend" means to create a job that runs the view on a specified schedule, for example daily, and capture the output into a table.

Step Three

The table created in step two is perfect for creating trend views. The table has a date/time field indicating each time the view ran. A trend view can show trends at the project level and allow drill-down to the subproject and team level. Given the data, creating such a trend view is easy.

Track Trend

Tracking Trend requires the scheduler role, which is included in the tenant_admin role.

Important Note

The view being scheduled will be used each time that the job runs. It means that if the view changes, then subsequent runs would publish the changed view and would reflect that changes. This may be what you intend, but if you don't want any changes to the scheduled job, then it's best to make a copy of the view and schedule using the copy of the view that is not going to be changed.

See the section Limitations below for more information.

Creating a Track Trend Job

To create a Track Trend job (step two above), we go the view for which we want to track trend (the view discussed in step one above. We then select "Track Trend" from the "File" menu. The following dialog shows up. It has two steps: Table and Schedule.

Table

In the step you name the table that will collect the trend data. The table is created on the Explore Analytics server and you can find it in the "Explore" data source. The table is created upon the first execution of the Track Trend job. Subsequent executions of the job insert additional data into this table. To find this table after the first execution, go to "Browse data sources and tables" in the "Data" menu, and then select the "Explore" data source.

Track trend1.png

Schedule

In this step you specify the schedule for the Track Trend job. The job will run on this schedule and collect data into the table that you specified in the previous step. The job does not publish the view. If you’d like to both publish and track trend, then you need to create two jobs. A "Schedule" (see Scheduling a View) and separately a Track Trend job as described here. The fields of the Schedule step are identical to those of the Schedule step that are explained in detail in Scheduling a View.

Track trend2.png

Listing Track Trend Jobs

To view and modify you Track Trend jobs, select "My track trend jobs" from the "Admin" menu.

The list shows all your Track Trend jobs. You can see the last and next runs and whether there were any errors in the last run. If you click on a row in the list you can delete or edit the job. Editing the view on which Track Trend is based.

The Track Trend job will use the view that was used to create it. It means that if you modify this view, the changes will take effect on the next execution. If you don’t want to affect the job, then it’s best to make a copy of the view before making any changes.

The Track Trend job can deal with new column labels that are discovered in subsequent runs. For example, if you have the product names in the columns and a new product was added, then the Track Trend job will add a corresponding field to your table.

Creating a Trend View

Creating a trend view based on the table created by Track Trend is no different than creating views in general. When you create the view, select the table that you specified when you created the job. This table is in the "Explore" data source.

Limitations

In general, once you have created a Track Trend Job and it ran once and created the table, you should avoid making changes the view on which the job is defined. You may modify the filter, but you must not change the order of the fields or remove fields.

List View

After the Track Trend already ran and created its table, you can add a field to the view, but you must add it at the end.

Pivot View

When creating a trend view based on a pivot, there are some limitations. The main limitation is that you can only have one layer of headings in the pivot. You can have any number of "row labels" fields (down the side), but only one "column labels" field (across the top). If you have multiple value fields, then they must be shown across the top (the special "Values" field will show in "column labels") and you cannot have any additional "column labels" field.

To avoid these limits, simply put all the category fields in the row area. Later, when you create your trend view, it's not a problem to select these fields for the column area. Remember, at this stage we're just capturing and storing the data.

Size Limit

There is a limit to the number of rows and columns that can be processed by the job. If that limit is exceeded, an error is generated and the job will not insert any rows in the table. The limit is similar to the limit on exporting view data.