In SAS Web Report Studio, measure filters are not usually available at the section level. There are two workarounds for relational data, depending on which version you are using.
Before using these workarounds
Creating the measure filter using one of the workarounds affects how the filter expression and the aggregate function are evaluated and applied. Before using these workarounds, you must understand the differences and make sure that you are seeing expected results.
Specifically, when you create the filter using the workarounds, the filter expression appears in a WHERE clause. The WHERE clause selects rows as they come into the query. It has to reference columns that exist in the query table or that are calculated using columns in the query tables. It cannot reference summary columns. In the following example, you can see that the expression is evaluated before the aggregate function is applied to the data item's values.
When you create the filter on the measure using business data, the filter expression appears in a HAVING clause. The HAVING clause references summary columns as the rows go out of the query. In the following example, you can see that the expression is evaluated after the aggregate function is applied to the data item's values:
HAVING
SUM(table0.Age) > 14
For more information about HAVING versus WHERE, see the following resources.
HAVING Clause
WHERE Clause
An Introduction to SQL in SAS
Proc SQL – A Primer for SAS Programmers
Workaround for version 3.1 and later
You can change the measure to a numeric category and create the filter on the category. For example, in the SASHELP.CLASS data set, you might change the Age data item to a category.
If you use this method, then you cannot perform calculations on the data item in the report.
Workaround for version 4.2 and later
In addition to the previous workaround, you can create the filter using the physical data instead of the business data. To perform this task, in the New Filter dialog box, click the Edit Data Item button that appears next to the Data Item box. In the Edit Expression dialog box, select the Data Sources tab, and then select the data item from the list of Physical Data items.
If you use this method, then you can perform calculations on the data item in the report.
Creating filters at the object level
As an alternative to filtering at the section level, after you create the report, you can use the Filter and Rank dialog box to apply measure (and category) filters to tables, graphs, and geographical maps.
Operating System and Release Information
SAS System | SAS Web Report Studio | Microsoft Windows Server 2003 Datacenter Edition | 3.1 | | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Enterprise Edition | 3.1 | | 9.1 TS1M3 SP4 | |
Microsoft Windows Server 2003 Standard Edition | 3.1 | | 9.1 TS1M3 SP4 | |
Microsoft Windows NT Workstation | 3.1 | | 9.1 TS1M3 SP4 | |
Microsoft Windows XP Professional | 3.1 | | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Server | 3.1 | | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Professional | 3.1 | | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Datacenter Server | 3.1 | | 9.1 TS1M3 SP4 | |
Microsoft Windows 2000 Advanced Server | 3.1 | | 9.1 TS1M3 SP4 | |
64-bit Enabled Solaris | 3.1 | | 9.1 TS1M3 SP4 | |
64-bit Enabled HP-UX | 3.1 | | 9.1 TS1M3 SP4 | |
Solaris | 3.1 | | 9.1 TS1M3 SP4 | |
HP-UX | 3.1 | | 9.1 TS1M3 SP4 | |
64-bit Enabled AIX | 3.1 | | 9.1 TS1M3 SP4 | |
AIX | 3.1 | | 9.1 TS1M3 SP4 | |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.