Add an Aggregation to the sales_store_country Facet
-
In the Administration Console, select Search > Search Logics > sl0.
-
Under the Facets section, expand
sales_store_country.
-
Expand Aggregations and specify the following:
-
Id: Revenue
-
Type: SUM
-
Expression: (sales_unit_price *
sales_quantity)
-
Click Apply.
Configure the Display of the Facet Aggregation
-
In Mashup Builder, select the /search page, and then select the
Design view.
-
From the Widgets panel, expand Tables
and drag Data Table to the page so it is immediately above the
Result List widget.
-
Click the Data Table widget header and on the widget
properties panel, specify the following:
-
In Widget title, enter Revenue by
Country
-
In Facet name, select
sales_store_country
(from the Values list on the left)
Note:
If you do not see this facet on this list, click the Reload icon at the top of
the Values list.
-
Select the Column tab.
-
In Facet column title, enter
Country.
-
In Columns, remove all the columns for
count and score.
-
Still in Columns, use the dynamic list on the left to add the
following:
Column 1:
- Value: Revenue
- Title: Revenue ($)
- Display percentage:
not selected
Column 2:
- Value: Revenue
- Title: % of Total
- Display percentage:
selected

-
Click Apply.
View Your Changes
-
Go to the Mashup UI, and refresh the search page.

-
Click a facet within the table to narrow your search results for one country.

|