Adding Conditions to Filters

Use the Condition Tab in the Filter dialog box to define rules to filter by. For example, in a view showing the average Unit Price for a collection of products, you may want to only show the Products that have an average unit price that is greater than or equal to $25. You can use the built-in controls to write a condition or you can write a custom formula.

Each option on the Condition tab is described below:

None - select this option if you do not want to add a condition to the filter. This is the default setting.
By Field - select this option to specify a condition based on existing fields in the data source. Use the first two drop-down menus to select the field and aggregation you want to base the condition on. Then select a condition operator such as greater than, equal to, etc. Finally, type a criteria value into the text box. For example, to create the condition described above, select Unit Price and AVG from the first two drop-down menus. Then select the greater than or equal to symbol ( >= ) from the operator list and type 25 into the final text box.
You can use the Range of Values box to load the entire range of values for the selected field in the data source. The example above would not make sense if all the records in the data source had an average unit price under $25. Using the Range of Values box helps you decide a value that makes sense based on the records in your data source. Click Load to view the range of values for the selected field.
By Formula - select this option for more advanced filter conditions. You can type a custom formula into the text box or open the formula editing dialog box by clicking the more button on the right of the text box.

No comments:

Post a Comment