Filter and sort data for Dataverse views

Completed

You've learned how to create and modify views and how to add or remove columns in views. In this unit, you'll learn how to include or exclude records in a view and how to define the order in which records are shown.

Filter data

To determine which records will be shown in a view, set up the Filter by property of that view.

Partial screenshot of the view designer. Focus is on the Filter by section in the right pane.

A filter consists of one or more criteria applied to each record to determine whether it should be displayed. A record is displayed if it meets the criteria and hidden if doesn't. You can group different rules using Or clause which displays the record if any rule is valid, or an And clause, which displays the record only if all rules are valid.

Screenshot of the Edit filters page. Focus is on the Boolean operators of And/Or.

You can set the filtering criteria for columns of the table with the view you're looking at or for columns of related tables. For example, an Account has a Primary Contact that can be assigned. When using a filter criterion, you can filter records where the primary contact's last name begins with the letter S.

Partial screenshot of the Edit filters page. Focus is on the Primary Contact (Contact) field and Last Name Begins with S criterion.

When you select Add to add filter criteria, three options are available:

  • Add row - Add a single row.

  • Add group - Group multiple criteria with and or operators.

  • Add related table - Add rules against tables that are related to the current table.

    Partial screenshot of the Edit filters page. Focus is on the Add pop-out menu, displaying the available options of Add row, Add group, and Add related table.

Whether a single criterion or a complex set of criteria, you can set a filter using these logical operations to determine whether a record should be displayed.

The filter isn't limited to the visible columns in a view. However, for visible columns, there's a shortcut to add a filter. Select the column heading and then select Filter by in the menu to define the filter.

Partial screenshot of the view designer. Focus is on the Email (Primary Contact) column heading and the Filter by option in the flyout menu.

Partial screenshot of the view designer. Focus is on the Filter by flyout menu.

Sort data

The order in which records are displayed in a view is determined by the Sort by settings. Using the view property pane on the right hand side of the screen, you can choose to sort by any of the view's visible columns. In this pane, you can sort by multiple columns, and the first selected column's sort will be applied, followed by the second's, and so on.

Partial screenshot of the view designer. Focus is on the Sort by section in the right pane with a list of available columns. Focus is also on the column headings that are displayed in the view.

You can also sort by a single column by selecting the column and then choosing ascending or descending order.

Partial screenshot of the view designer. Focus is on the Main Phone column heading and the Sort ascending and Sort descending options in the flyout menu.

Modify filters and sort criteria in Power Apps

Model-driven app users can modify filters and sort criteria in the app. They can select Edit filters to apply filter and sort criteria temporarily to the current view. An asterisk is appended to the view name to indicate that a temporary view change has been applied.

Partial screenshot of a model-driven app. Focus is on Edit filters and the asterisk next to the view name.

To save this temporary view as a new personal view, the users can select the drop-down next to the name of the current view and then select Save as new view.

Partial screenshot of a model-driven app. Focus is on current view name and Save as new view.

Next steps

You've learned how to modify records displayed in a view by creating or editing the view's filter criteria. You've also learned to change the order of the records using the sort feature. Next, you apply what you've learned in an exercise with the Account table.