Using Table Filters
Table Filters
Table filters are applied per report element only, to report elements with a table structure, so not all report element types are supported. Table filters can be edited in Config/Reports per report element on the Filters tab.
Table filters are similar to report filters, though table filters are applied to query result tables. A table filter expression applies to all rows of a table, it is executed row per row. If the expression is set to true, then the row will be shown in the final output.
Table filter expressions uses the cell_by_name () or cell_by_row_number and name() functions to refer to a specific table column by defining the report field name in the syntax.
cell_by_name('report_field_name')
cell_by_row_number_and_name(row_number, 'report_field_name')
A table filter expression must evaluate to boolean true or false. If the expression evaluates to true, the row will be shown, if false it will be hidden.
For instance:
cell_by_name('visitors') > 20
cell_by_name('page), 'product')
and (cell_by_name('page_views') > 20)
and (cell_by_name('visitors') > 10)
Advantages of table filters over report filters
Table filters are applied to the aggregated values of numerical fields, rather than values from the database. This makes it possible to do filtering which cannot be done with report filters. For instance, in the database, every row in a web log is one visitor, so you can't use log filters or report filters to select "page views >10". But in report tables, the page views have been aggregated before the filtering occurs, so you can use "page view > 10" to select all table items which have more than 10 page views, total.
Report field and table filter expression syntax
Report field and table filter expressions are composed of:
cell_by_name(report field ID)
(cell_by_name('hits') * cell_by_name('page_views')
cell_by_row_number_and_name(row_number, report field ID)
The global variables row_number and number_of_days