Funktionen Distinct i PowerAppsDistinct function in PowerApps

Opsummerer poster i en tabel og fjerner dubletter.Summarizes records of a table, removing duplicates.

BeskrivelseDescription

Funktionen Distinct evaluerer en formel på tværs af hver enkelt post i en tabel.The Distinct function evaluates a formula across each record of a table. Distinct returnerer en tabel med én kolonne, der indeholder resultaterne med dublerede værdier fjernet.Distinct returns a one-column table that contains the results, with duplicate values removed.

Fields of the record currently being processed are available within the formula. You simply reference them by name as you would any other value. You can also reference control properties and other values from throughout your app. For more details, see the examples below and working with record scope.

SyntaksSyntax

Distinct( Table, Formula )Distinct( Table, Formula )

  • Table – påkrævet.Table - Required. Tabel, der skal evalueres på tværs af.Table to evaluate across.
  • Formula – påkrævet.Formula - Required. Formel, der skal evalueres for hver post.Formula to evaluate for each record.

EksempelExample

Hvis du har en tabel med navnet Employees, som indeholder kolonnen Department, indeholder denne funktion hvert eneste entydige afdelingsnavn i den kolonne, uanset hvor mange gange hvert navn blev vist i den pågældende kolonne:If you had an Employees table that contained a Department column, this function would list each unique department name in that column, no matter how many times each name appeared in that column:

Distinct(Employees, Department)Distinct(Employees, Department)