In List, you can define a list or group of elements for easy selection of multiple elements when defining a query within Discover.
For instance, you may want to build a set of queries to investigate sales across various regions. In such a scenario, rather than separately selecting each European office, you can simply configure a list containing the European offices. Then you’ll select the list when building queries about the European offices in Discover.
In the long run, building lists can save users a lot of time when they need to include multiple elements within a query.
Custom Lists are not to be confused with the List Builder tool, although the List Builder wizard can be used to assist in building your custom list.
Walkthrough: Build a List
Follow this example to filter and sort a custom list. We will create a list of the top 25 products by net profit, excluding mountain frames, and sorted in descending order.
Use the SampleDemo data model In-Memory DB to follow this example.
From the Tool Panel, open Add, and double click the Standard Set block, or drag it onto the canvas. The Properties panel will open along the bottom of the canvas.
- Ensure that the List block is selected.
- From the Select Hierarchy panel, open the products dimension and select the Product hierarchy.
- From the Select Elements panel, select the Product header to select the entire hierarchy; the selected elements will appear in the Selected panel. Users can also select elements using the List Builder (blue arrow below) or existing custom logic (green arrow)
- Click the Run button to test the function; the list will appear in the Result Preview panel and the function's syntax will appear in the Syntax Preview panel (red highlight). If the function fails, open the Problems panel (red arrow) to find out why.
Go to the Filter actions and connect the Contains block to the list; from the Insert Arguments panel enter the search string "mountain frame" (red highlight). This will return a list of products containing the search string "mountain frame" (green highlight).
In this example, we want to remove all the mountain frames from the list, so check "Exclude from result list". This returns a list of all elements from the Product hierarchy, excluding those elements containing the string "mountain frame" (green highlight).
Go to the Pick a Data Point window (red highlight) and select the net profit measure; this will return a list of the top 25 products by net profit, excluding elements containing the string "mountain frame" (green highlight).
Go the Sort Options window and change the sort order to Descending (red highlight); this will sort the list in descending order of net profit (green highlight).
Save your custom list.
Click the Quick Discovery button (red highlight) to immediately open the custom list in a new discovery.
You can also add the list to a discovery later on by opening the Product hierarchy's custom logic from its Elements panel (green highlight), and adding the list to the drop zones (red highlight).