nerdexam
Microsoft

PL-400 · Question #415

You are developing a canvas app that connects to Microsoft Dataverse. You add the Accounts table as a data source to the app. You implement a gallery that will display information from the Accounts…

The correct answer is C. Filter(Sort(Accounts, 'Account Name', SortOrder.Descending), IsBlank('Account Name') = false). Option C is correct because it queries directly from Accounts - the live Dataverse data source - rather than collAccounts, the local collection that may be stale or incomplete, which is the root cause of users seeing fewer rows than expected. It also wraps the query in…

Submitted by diego_uy· Apr 18, 2026Implement Power Apps improvements

Question

You are developing a canvas app that connects to Microsoft Dataverse. You add the Accounts table as a data source to the app. You implement a gallery that will display information from the Accounts table. The Accounts table is stored and cached locally as a collection named collAccounts. Data in the gallery must always display accounts that have a name value. The gallery uses the following Power Fx formula: You deploy the app to production. Users report that the expected number of Account rows in the app does not appear. You need to resolve the user issue. How should you modify the Power Fx formula?

Exhibit

PL-400 question #415 exhibit

Options

  • ASort(Accounts, 'Account Name', SortOrder.Descending)
  • BSort(collAccounts, 'Account Name', SortOrder.Descending)
  • CFilter(Sort(Accounts, 'Account Name', SortOrder.Descending), IsBlank('Account Name') = false)
  • DcollAccounts

How the community answered

(53 responses)
  • A
    4% (2)
  • B
    15% (8)
  • C
    75% (40)
  • D
    6% (3)

Explanation

Option C is correct because it queries directly from Accounts - the live Dataverse data source - rather than collAccounts, the local collection that may be stale or incomplete, which is the root cause of users seeing fewer rows than expected. It also wraps the query in Filter(..., IsBlank('Account Name') = false) to satisfy the requirement that only accounts with a name value are displayed.

Why the distractors fail:

  • A queries the correct live source and sorts, but omits the blank-name filter, so nameless accounts would still appear.
  • B sorts collAccounts (the local cache), which is the very thing causing the missing-rows bug, and also skips the blank-name filter.
  • D returns collAccounts raw - no sort, no filter, and still the stale cache problem.

Memory tip: "Cache = stale, Source = fresh." Whenever users report missing rows, suspect a local collection; switch to the direct data source and wrap in Filter to enforce any "must have a value" rules.

Topics

#Power Fx#Canvas Apps#Dataverse#Data Filtering

Community Discussion

No community discussion yet for this question.

Full PL-400 Practice