In this article
Page-Specific filters are pre-configured by designers and cannot be changed by end-users. Their code is within pages or widgets using expressions.
A Page-Specific filter is always applied to individual pages or widgets and is pre-configured by the dashboard designer. Unlike other types of filters, its code is placed within the page or widget to which it is applied and not within the layoutArea toolbar block. As a result, it will not appear in the filter summary and cannot be changed by the end user. Page-Specific filters utilize expressions to define the filter criteria, providing almost limitless possibilities.
The general syntax is:
page {
filter expression {
value: filterExpression
}
}or
widget {
filter expression {
value: filterExpression
}
}Below is an example of the code for a static filter:
title "static"
config hub {
hub: 733
table survey = p1032107.response
table accounts = crmdata.accounts
table contacts = p1046755.response
relation oneToMany rel2 {
primaryKey: accounts:AccountID
foreignKey: contacts:accountid_crm_formatted
}
}
page "Account List" {
filter expression {
value: average(score(survey:Q1.1), true, accounts:) > 7
}
widget accountList {
size: large
filter expression {
value: accounts:revenue > 100000
}
hierarchy: accounts:HierarchyID
label: "Accounts "
table: accounts:
column value accountName {
label: "Accounts"
value: accounts:AccountName
filterable: false
}
column metric ltr {
label: "LTR"
value: average(score(survey:Q1.1))
format: formatterLTR
view: metrics
target: 9
}
column value total {
label: "Revenue ($)"
value: accounts:revenue
format: formatterID
}
}
}