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.

In the following example, you can see a sum of Won Opportunities split out by Region

 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.


  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.

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