Mashup View

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

Introduction

A Mashup View is a special kind of view that merges together two or more views. It's a more advanced feature that should only be used if the view that you want cannot be created as a regular view.

The term "mashup" refers to combining two or more existing views into a single view by merging their data.

A Mashup View is a special view, but in many regards it still works like other views. You can share, publish, schedule, track trend, export its data, and more. You can sort, perform "show matching" and "exclude", and drill-through to details. On the other hand, drill down is not available in a mashup view.

Uses of Mashup View

A Mashup View is a powerful tool that allows you to create a view that is otherwise hard or impossible to create:

  • Combine data from multiple data sources
  • Combine data that is not directly related
  • Assemble data using multiple steps

Input Views

A Mashup View has two or more input views. The input views are the views that are combined to create the mashup view. In the next section you'll see how to create a mashup view.

The input views must be of the same type (for example, pivot). If the input views are charts, they must also be of the same chart type (for example, map).

Creating a Mashup View

Before creating a mashup view, please review the tutorial and technical discussion below. To successfully create a mashup view, you need to understand how it combines the data from its input views.

Follow these steps to create a mashup view:

  • Select the "New mashup view (advanced)" option from the "File" menu. The dialog will appear
  • Give the mashup view a name
  • Select two or more input views. These are views that you already created to provide data for the mashup
  • To select an input view, start typing its name into the next available "Input View Name" field and pick from the list of matching names. If you see duplicates in the list, you can limit the list to only show your personal views or only show shared views
  • If you want to specify more than two input views, use the "Add Input View" button
  • The order of the input views matters. Please see the Technical Discussion for more information
  • When you click OK, the requested mashup is validated and you may receive a message if the inputs don't meet all of the conditions for a successful mashup. To learn more about these conditions, please see the section "Technical Discussion" below

Mashup dialog.png

Editing a Mashup View

When a mashup view is created, a copy of each of its input views is made and kept with the mashup view. The mashup view uses these copies and not the original views. Therefore, after the mashup is created, when we refer to its input views, we refer to these copies of the input views.

Much of the definition of a mashup view is kept in its input view. Therefore, to edit the mashup view you'll be editing its input views. The "Edit Mashup" button will bring up a list of the input views. You can then open and edit these views one at a time.

Edit mashup.png

When you open an input view, the breadcrumbs will provide a link back to the mashup.

In a few cases, you can edit the mashup directly, for example to change the sort order. For more information please see the Technical Discussion.

The type of the mashup view is based on its inputs. For example, if you turn all the input views into a pivot, then the mashup will also turn into a pivot.

Mashup Calculations

Any calculation defined in an input view will be performed in the mashup. There is however the case of calculating a value based on values from more than one input. In that case, use the "Edit Mashup Fields" to create or edit mashup calculated values. This is explain in detail in Mashup Calculations.

Tutorials

It helps to learn about mashup views by reviewing examples. The following are two examples that illustrate the process of creating a mashup view.

Incidents and Outages - this example combines data that's not directly related into a single timeline. Incidents are support calls to the IT helpdesk and outages are service interruptions. Although there may be some causal relationship between an outage and calls to the helpdesk, in many cases these relationships cannot be directly traced in the data. By putting these together in the same timeline, we may gain some insight.

Computers without Antivirus - this example solves a common problem of finding items in one table for which there are no items in another. By merging a view of all computers with a view of computers with antivirus we can easily locate the computers without antivirus.

Technical Discussion

When creating a mashup, we require that all the inputs will be of the same type. For example, we can mashup a pivot view with another pivot view, and we can mashup an XY chart with another XY chart.

Data and Presentation

A mashup View is processed as follows

  • Each input view is run to obtain its data
  • The data is merged into a single data set
  • Calculations are performed and the data is sorted together
  • The data is presented as a single view

The order of the input views sets the priority by which they affect the presentation. For example when merging a field, the width of the field (list or pivot) is based on the first input view that has this field.

View Types

In this section we'll discuss the specifics of how a mashup is put together for each type of view:

Mashup List

When creating mashup of lists, columns are merged if they have the same heading. Therefore if a "Last Name" column exists in more than one input view, the mashup will have a single "Last Name" column.

By default, rows are not merged. This is useful for combining two lists into a single list. The single list will have all the rows from all the inputs sorted together. For example, combining two email lists from two data sources into a combined list.

Using Mashup Options, you can also merge rows together. This is covered in more detail in the List Mashup page.

A Mashup List is created during Drill Through

When you drill through to details in a mashup pivot or chart, the result is a list of the rows that make up that piece of data. The list will include rows from the different input views. Explore Analytics creates this list by creating a mashup list view using the input views of the mashup. To control the presentation of this drill-through list, you can edit the list of each of the input views (go to the input view, turn it to a list, make the changes, and turn it back to a pivot or chart.)

Mashup Pivot

When pivot views are combined, their columns, rows and value fields are merged respectively. Remember that a pivot has these 3 areas: row labels, column labels, and values.

Merging Pivot Fields

When merging row, column, and value fields, we match them by both area and label. For example, a "Company" field in the row area will be merged together across the input views. All the input views must have the "Company" field in the row area. When the data is merged, the same company, e.g., "ACME" will be merged together (see the section How Data is merged below). When merging columns, a "Year" field in one view will be merged with a "Year" field of another input view provided that it's also in the columns. Within the "Year" field, specific labels are merged together, for example "2012" (the year 2012) will be merged across input views.

When merging date/time fields, their grouping (e.g., month) must agree.

When merging value fields, fields with the same name will be merged together. Please make a note of the following rules:

  • Be careful not to mix duration values with numeric values
  • Be careful not to mix count of distinct values with another type of count
  • If a field is calculated, then calculation of the first input view will be used
  • If a field is hidden in one view, but visible in another, it will be visible in the mashup
  • When there are multiple value fields, the special “Values” field that indicates whether values will be in the rows or the columns must be set the same way across all the input views

How Data is merged

Data in a pivot is grouped by its row and column labels. For example, if we have "Company" in the rows and "Year" and "Month" in the columns, then data for the same company in the same year and month will be grouped together. When the data is merged for a mashup view, this rule still applies.

For example, if one input view has data for 2010, 2011, and 2012, and the second view has data for 2011, 2012, and 2013, the mashup will have columns for 2010, 2011, 2012, and 2013. Hopefully this is exactly what you expected.

Mashup Timeline Chart

When creating a timeline mashup, all inputs must be timeline charts. The date/time field will be merged together (regardless of its name) and it must have the same grouping (e.g., month).

If there's a category field, then all the inputs must have a category field and this field will be merged regardless of its name. When there's a category field, only one value field is allowed and it will be merged regardless of its name.

If there's no category field, then each view can have one or more value fields. These fields will be merged based on their label. For example, if a field called "Count" exists in multiple input views it will be merged and added up. If you want to keep the counts separate, then give them different labels. For example, call the first one "Incidents" and the second "Outages" and they will appear separately.

Note: OHLC and Candle charts are not support for a mashup view.

Mashup Category Chart

When creating a category mashup, all inputs must be category charts. The category field will be merged together (regardless of its name).

If there's a secondary category field, then all the inputs must have a secondary category and this field will be merged regardless of its name. When there's a secondary category, only one value field is allowed and it will be merged regardless of its name.

If there's no secondary category, then each view can have one or more value fields. These fields will be merged based on their label. For example, if a field called "Count" exists in multiple input views it will be merged and added up. If you want to keep the counts separate, then give them different labels. For example, call the first one "Incidents" and the second "Outages" and they will appear separately.

When creating a mashup of pie charts, the result may become bar chart if, for example, the charts ends up with more than one value field.

Mashup XY Chart

When creating an XY mashup, all inputs must be XY charts. All X Axis fields will be merged together regardless on their name. The same is true for the Y Axis field and the "Size of Bubble" field (the Z Axis). Category fields such a pie, color, and marker, are merged together (respectively) without regards to their name.

Mashup Map Chart

When creating a Map mashup, all the inputs must be Map charts of the same type (all indicated by points or all indicated by coloring areas). The location must be specified in the same way (e.g., by country or by latitude and longitude). The location fields are automatically merged across input views.

Output Filter

When you mashup pivots or charts, any output filter on input views will be ignored. The reason is that the output filter cannot be applied until the after data is pivoted (into multiple-level columns and rows) and that happens after the data is mashed together. Therefore, you'll need to create the output filter on the mashup rather than on its inputs.