GetLastFilterValue function
Applies to: TBM Studio 12.0 and later
Returns the last value applied to a filter.
Where to use
This function can be used in:
- Formula columns in report tables
- Dynamic Text
Syntax
GetLastFilterValue(column)
Arguments
column
The column from which to retrieve the last applied filter value.
Return type
String
Example A
The following would return the value "Sales."
!Filter[Business Unit=Sales]
Example B
Assume you have the report shown in the following image:
You would like the name of the table to change based on the slicer selection. For example, in the previous image, UNIX has been selected in the slicer and you would like the name of the table to read Server Costs - UNIX as shown in the following image:
To create the dynamic table name:
- Hide the default header for the table by opening the Properties dialog for the table, selecting the General tab, and clearing the Show Header option.
- Add an HTML text box to the report with the following HTML
code:
<font face="Arial"><p style="color:#3366CD;text-align:left;font-size:10pt">Server Costs - <%=getLastFilterValue()%></p></font>
- Position the HTML box above the table to server as the table name.
- Select the HTML text box.
- In the HTML Configuration dialog, add the Server Type field to the Rows area.
- Hide the default header for the HTML text box by opening the Properties dialog for the table, selecting the General tab, and clearing the Show Header option.
See also: GetLastFilterColumn