#PowerPlatformTip 42: 'Dataverse Views'
TL;DR: Define the filter once in a Dataverse view and use the view’s name as the condition in
Filter():Filter(Accounts, 'Accounts (Views)'.'My Active Accounts'). Dataverse applies the view’s filter on the server, you can add your own conditions on top, and the same view works in flows and the Web API.
💡 Challenge
Filtering large Dataverse tables directly in a canvas app means long filter formulas, delegation warnings for conditions Power Apps can’t translate, and the same filter rebuilt in every app and flow. Conditions like “owned by the current user” or “modified in the last 30 days” are easy in a view, but awkward to write as a formula.
✅ Solution
Put the filter into a Dataverse view and reference the view in your formula. For Dataverse data sources, a formula in Filter() can be the name of a Dataverse view. If you supply more than one formula, they’re combined with And. The filtering happens in Dataverse, not in the app.
🔧 How It’s Done
1. Create the view.
🔸 In make.powerapps.com, open Tables, select your table and open Views > New view.
🔸 Add the columns you need and save the view, for example My Open Tasks.
2. Define the filter in the view.
🔸 Use Edit filters and conditions that are hard to express in a formula: Owner Equals current user, or Modified On Last X days.
🔸 Save and publish the view.
3. Use the view in the app.
🔸 Add the table as a data source and set the gallery’s Items to:
Filter(Tasks, 'Tasks (Views)'.'My Open Tasks')
🔸 Combine it with your own condition, for example a search box:
Filter(
Tasks,
'Tasks (Views)'.'My Open Tasks',
StartsWith(Subject, txtSearch.Text)
)
🔸 The view decides which rows come back. Columns from related tables that the view adds are not returned to the app, only columns of the table itself.
4. Check the result.
🔸 Compare the gallery with the view in the table designer. Both show the same rows.
🔍 Where a view lives, and how to call it outside the app
A view is a row in the savedquery table. Tested on the standard account views through the Web API:
🔸 GET .../savedqueries?$select=name,fetchxml,layoutxml&$filter=returnedtypecode eq 'account' returns each view with its fetchxml (the filter and the <order>) and its layoutxml (the columns). “Active Accounts” has the filter statecode eq 0, sorts by name ascending and lists name, telephone, city and primary contact. The savedqueryid of this system view is the same 00000000-0000-0000-00aa-000010001002 in every environment.
🔸 GET .../accounts?savedQuery=00000000-0000-0000-00aa-000010001002 runs that view server-side: the response contained exactly the view’s columns, in the view’s sort order. Calling the “Inactive Accounts” view the same way returned zero rows while “Active Accounts” returned all eight test accounts, so the filter is applied by Dataverse, not by the caller.
🔸 Adding &$filter=startswith(name,'ZZ') on top of savedQuery narrowed the result further, so you can combine a view with your own filter. Adding $select alongside savedQuery changed nothing, the view’s column list wins.
This is the same request a flow’s “List rows” action sends when you paste the view’s GUID into its “Select view” field, which makes the view a single definition shared by the app, the flow and any API client.
🎉 Result
Your app gets exactly the rows the view defines, filtered by Dataverse. The filter logic lives in one place and is shared by apps, flows and API clients.
🌟 Key Advantages
🔸 Server-side filtering: Dataverse applies the view, the app only receives matching rows.
🔸 Conditions without formulas: Equals current user or relative dates are a click in the view editor.
🔸 One definition everywhere: the same view in canvas apps, model-driven apps, flows and the Web API.
⚠️ Good to Know
🔸 Aggregate functions such as Sum() or CountRows() aren’t supported on views in canvas apps.
🔸 Use the view name exactly as shown in the formula IntelliSense after typing 'Tasks (Views)'.. A renamed view must be updated in the formula.
🎥 Video Tutorial
🛠️ FAQ
1. Can I create multiple custom views for the same Dataverse table?
Yes, you can create multiple views with different filters and sorting options to serve various app scenarios and user needs.
2. Do custom views affect the underlying data in Dataverse?
No, views only define how data is displayed and filtered. They don’t modify or delete the actual data in your tables.
3. Can I share custom views with other users or environments?
Yes. Create the view inside a solution, then it’s exported and imported to other environments along with your apps.
4. Can I use the same view from a flow or the Web API?
Yes. Call GET .../<entityset>?savedQuery=<savedqueryid>; the savedqueryid comes from the savedqueries table. Dataverse returns the view’s columns, its sort order and its filter, and you can append $filter=... to narrow it further. $select is ignored when savedQuery is set.
🔗 Related Tips
🔸 #PowerPlatformTip 41: ‘Standard Tables in Dataverse’ - know which built-in tables to build these views on before creating custom ones.
🔸 #PowerPlatformTip 39: ‘Mastering FetchXML’ - reach for FetchXML when a view’s filter options aren’t enough.
This tip is by Marcel Lehmann, Microsoft MVP (Business Applications) and founder of the Power Platform Academy – live Power Platform workshops, free or CHF 49. Join the workshop waitlist to get notified about new dates. For companies that want this implemented for them, see KMUpower – Power Platform consulting & automation for SMEs (DACH).