Configure the Pivot Table Widget
-
In Mashup Builder,
go to the /search page and select Design.
-
From the Widgets panel, select Table > Pivot Table.
-
Drag the Pivot Table on to the /search page so it is just below
the Navigation Header widget.
-
Click the Pivot Table widget header.
-
In the Search API tab, for Search Logic, select sl0.
-
To configure the table header, go to Columns:
-
In Facet name, select sales_category
-
In Sort function, select alphanum
-
In Legend, enter Clothes.
-
Select Enable column drill-down.
-
To configure row display by countries then by cities, go to Rows and for:
-
Legend, enter Country/City.
-
For the first row: in Facet name, select sales_store_country;
in Sort function, select alphanum
-
For the second row: in Facet name, select sales_store_city;
in Sort function, select alphanum
-
For No. facet levels shown by default, enter 1to display
by default the first facet level only (
sales_store_country ).
-
To configure the sales quantity display, go to Aggregations:
-
In Type, select COUNT
-
In Expression, select sales_quantity
-
In Max decimals, do not select anything. This field
applies to float values (an empty value shows all available decimals).
-
In Legend, enter Sales quantity
-
Click Apply.
View Your Changes
-
Go to the
Mashup UI.
-
Refresh the screen.
In the
Mashup UI,
you can now see the Pivot Table widget on the search page.
-
You can expand the view for a specific country, for example
China, and see values for its cities
(Beijing, Hong Kong,
Shanghai).
Note:
You can also click any value of the pivot table to refine results on the whole
page.
|