Create Buckets for Attribute Values

When building reports, you may find it useful to organize attribute values into buckets in which multiple attribute values are combined into a single number. For example, you want to organize attribute values for U.S. States (California, Oregon, Washington) into regional buckets (Western U.S. States). The goal is to reduce the complexity of a report and to provide easier ways to digest or organize information.

This intermediate tutorial assumes some knowledge of MAQL. For more information, see MAQL - Analytical Query Language.

In the following example, you can see a sum of Won Opportunities split out by Region:
Won Opportunities by Region report
Many of the Accounts are located in different regions of Europe, the Middle East and Africa (or EMEA), as well as areas of North and South America. These breakouts may be easier to display in a report by organizing the attribute values into buckets for each general region.

Buckets are defined via MAQL as part of individual metric definitions.

This solution is useful if you are creating buckets for use in a few metrics and reports. If you need to create buckets to apply across a large number of metrics and reports, you should consider modifying your source data, data model, and ETL processes to support this usage. Contact your project administrator for more information.

Steps:

  1. Accounts in the EMEA region may be grouped into a single bucket. Create the following metric (# Won Opps - EMEA) using the # of Won Opps metric, sliced by the attribute values in the region:

    SELECT # of Won Opps. WHERE Account Region IN (EMEA - Balkan,EMEA - Benelux, EMEA - East Europe, EMEA - France, EMEA - Iberia, EMEA - Middle East, EMEA - Nordics, EMEA - Others, EMEA - UK&Ireland)
  2. Create metrics for similar buckets for the other regions. These metrics use the same metric syntax as in the above metric, except that you are including only the regions specific to that metric:
    1. # of Won Opps. - North America
    2. # of Won Opps. - South and Central America
    3. # of Won Opps. - Asia-Pacific
    4. # of Won Opps - Other
  3. Verify that each attribute value is included in one (and only one) of the metrics.
  4. After all metrics for regional buckets are defined, you can define the report.

    Since the new metrics essentially create attribute slices in the report, there is no need to include the original attribute, Account Region, in the report. Each region is now defined by its own metric.


    Report definition


  5. The end result is a report providing a high-level view of the accounts by region:

Finished report with buckets

If you need to re-apply a set of attribute values across other metrics, you can use copy and paste in the Custom Metric Editor to ensure consistency across your metrics. Note that any changes to these attribute values must be propagated across all metrics specified in this manner.

Powered by Atlassian Confluence and Scroll Viewport.