The Current User filter provides a mechanism to create well-structured models with scalable filter modules that reduce maintenance overhead and provide users with flexible data choices.
The Users list can be used in a filter module to display data relevant only to the current user across an entire model. Because the filter uses Current User, rather than the user name, it respects different settings for different users.
There are two ways in which users can make selections:
- the filter module can be published to the dashboard, enabling the user to make selections within the dashboard; or
- the filter module can be floated over the data module whilst selections are made.
The dashboard must be refreshed before the changes will display.
Advantages of the Current User filter
Using this approach will build modules that are re-usable and low maintenance, providing users with the ability to filter data more efficiently and add new data. An individual filter module can be used with other modules that have the same dimensionality—line items do not need to be duplicated within a model.
Individual line items, used as a filter in a data module, can be dimensioned by the Users list. This means selections made by one user do not impact selections made by another. In addition, rather than filtering by the whole model, you can filter by individual line items.
This is an example of a dashboard with a filter module at the top and a data module beneath. You can see the user selections in the Filters module are replicated in the Cost Centers - User Filter Module.
If the Users list is used as a dimension of a line item, when the Filter dialog is opened, the Current User (from the Users list) is automatically displayed as a filter.
Incorporating the Current User filter
The process requires the Users list to be a dimension of a filter module. That filter module is then referenced in a line item in a data module. In the data module, the specific line item has a calculation that collects the values of the choices the user has made in the filter module. The data module is then published to a dashboard. When the criteria in the filter module are amended, the data in the dashboard is updated when the user clicks the Refresh button.
If the number of attributes to filter on is greater than three, you should consider creating separate filter line items or a series of filter modules, to break down the complexity of the calculations and make it easier to troubleshoot issues.
Create a module with the Current User filter
To explain this process, we'll create a model where, based on the choices they make in a filter model, the Current User can display data relating to cost/profit centers in different locations and industries on a dashboard. The filter criteria are based on these lists: Country, Industry, Category, Cost Centers; and the built-in list: Users.
Four modules are created:
- Cost Center Details
- Cost Center Filter
- Cost Center Data
The Filters module provides an interface for users to select filter criteria. The Cost Center Data module contains data relating to revenue and expenses. The data displayed in this module is selected in the Cost Center Filter module which references cost center attributes in the Cost Center Details module.
This structure is scalable—you can continue to add or remove line items as necessary, making the modules independent and flexible.
Note: You may be tempted to combine the line items in the Cost Center Details module and the filter line item into the Cost Center Data module. We recommend you do not do this. Putting the details line items into the data module lock them into that module: they can't be re-used in any other module. By breaking the detail line items out into a separate module, they can be used with other modules across the model, ensuring that line items aren't being duplicated unnecessarily. In this example, we have duplicated line items but simply for illustrative purposes and to assist with testing the process.
- Create four lists: Country, Industry, Category, and Cost Centers.
- Add data to the lists.
- Click the list, Cost Centers in Model Settings > General Lists, and select Organization from the Parent Hierarchy dropdown list.
Create filters module (Filters)
- Create a new module using the Users list as a dimension.
- Create the line items: Country, Category, and Industry.
- In Blueprint, format the line items to the list with the same name.
- Pivot the Users list to pages and the line items to rows.
Create details module (Cost Center Details)
- Create a new module using the Cost Centers list as a dimension.
- Create line items to represent the detail for each cost center: Country, Category, and Industry.
- Pivot the Cost Centers list to rows and the line items to columns.
- In Blueprint, format each line item to the list with the same name.
- Add data to the grid.
Create a filter module (Cost Center Filter)
- Create a new module using the Users and Cost Centers lists as dimensions.
- Create line items to link to the cost center detail on which to filter the user's view of data: Country?, Category?, and Industry?.
- Create a line item, Filter, to gather the values of the line items created in step 2.
- Pivot the Cost Centers list to columns and the line items to rows.
- In Blueprint, format each line item to Boolean.
- In Blueprint, add a formula to each of the line items:
ISBLANK(Filters.Country) OR Cost Center Details.Country = Filters.Country
ISBLANK(Filters.Category) OR Cost Center Details.Category = Filters.Category
ISBLANK(Filters.Industry) OR Cost Center Details.Industry = Filters.Industry
Country? AND Industry? AND Category?
The selections made on the grid are clearly visible and the user name at the top of the grid is the Current User as shown in the Filter dialog.
Where there are a number of attributes, seeing all the line items and selections in one location makes troubleshooting easier.
Create data module (Cost Centers Data)
- Create a new module using the Users and Cost Centers lists as dimensions.
- Create the line items: COGS, Revenue, Other Expenses, Country, Category, and Industry.
- In Blueprint, format the:
a. COGS, Revenue, and Other Expenses line items as Number.
b. Country, Category, and Industry line items to the to the list with the same name.
- Add or import data into the COGS, Revenue, Other Expenses line items and refer the Country, Category, and Industry line items to the Cost Center Details module.
Create a user dashboard and check the Current User filter
- In the Filters module, select the data grid and, from the Anaplan toolbar, select View > Publish to Dashboard and select a target dashboard.
- In the Cost Centers Data module, select the data grid and from the Anaplan toolbar, select View > Publish to Dashboard and publish the grid to the dashboard selected in step 1.
- In the Dashboard Designer, move the Filters module above the Cost Centers Data module and Save the dashboard.
- In the dashboard, on the Cost Centers Data module, from the context menu, select Data > Filter.
- Select the Cost Centers tab and select the Filters module filter, you will then see the Users: Current User filter.
The filter displays the operator is equal to with a check mark. This represents the Boolean data type applied to the Filter line item. All users, except the Current User, are filtered out.
Alternatively, users can drag the Filter module tab to float the window over the dashboard to make their selections.
|Module published to dashboard||Module floated over module|
After choosing criteria in the Filter model, users must click the Refresh button on the dashboard to see the results.