Add the units_sold Multi-Dimension Facet
-
In the Administration Console,
select Search > Search Logics > sl0.
-
Click Add facet, and specify the following:
-
In Name, type units_sold.
-
In Type, select Multi-Dimension.
-
Specify the following Dimensions:
-
In the first facet, select sales_color.
-
In the second facet, select sales_store_city.
-
Expand Aggregations, and specify the following:
-
In Id, type units_sold.
-
In Type, select SUM.
-
In Expression, enter
sales_quantity .
-
Click Apply.
Configure the Display of the Multi-Dimension Facet
-
In Mashup Builder, select the /search page, and then select the Design view.
-
From the Widgets panel, expand Tables
and drag 2D Data Table to the page so it is immediately above the Data Table widget.
-
Click the 2D Data Table widget header and specify
the following:
-
In Widget Title, type Unit Sold by Country and Color.
-
In Facet id, select units_sold (from the contextual menu on the left).
Note:
If you do not see this facet on this list, click the "Reload" icon at the top of
the list.
-
In Aggregations, specify the following:
-
In Aggregation, replace the default
count aggregation by units_sold .
-
In Label, type Units Sold.
-
Click Apply.
View Your Changes
-
Go to the Mashup UI, and refresh the search page.
-
Search for shirt
A two-dimensional table now displays in the search results.
-
When you click a value within the table, for example
red for Rio de Janeiro ,
this narrows the search results on both dimensions.
|