Dynamic sections length (alphabetical list)
In this document, I want to illustrate how to have a better reading of a report containing a large list of people, customers, products, or anything that need to be listed.
To facilitate the reading, we create sections but that’s not enough we also want to manage the number of items in each section.
In the document I will show you how to manage a long list of customers sorted in alphabetical order.
The idea is to create a section by letter (or left part of the customer name) and to dynamically change the length to reduce the size of the section.
In addition, we can also easily swap the first name and the last name to have a better visibility of the customers list.
Full name type
As we want to display customers by the first name or the last name, we need to create a variable named “Full name type” and create an input control to manage the content of this variable.
We create an input control with the following properties:
- Radio buttons type input control based on “Full name type” variable.
- Custom list of values with 2 values:
- First name + Last name
- Last name + First name
- Only those 2 values are displayed
- Default value: First name + Last name
Now we create the “Full name” variable using the value of “Full name type” variable. Here is the formula:
=If [Full name type] = “First Name + ” ” + Last Name” Then [First name] + [Last Name] Else [Last Name] + ” ” + [First name]
Now we create the “Length” variable that is a measure with a numeric value, formula: =1.
This variable is managed by an input control with the following parameters:
- Simple slider
- Minimum value: 1
- Maximum value: 10
- Default value: 1
We create the variable “Initial” that will be used in the section to filter the table containing the list of customer.
This variable is using the “Full name” variable” and the “Length” variable. The formula is:
We can then create the report that contains a table with “Full name” and all other dimensions, attributes or measures that are necessary to display the list of customer.
We create a section based on “Initial variable”.
The report will look like this:
Now we can play with the 2 following input controls to change the report content.
In conclusion, this is an easy way to filter a large list of items and also to swap components of a given item
You can download the Web Intelligence report attached to that publication.