In this article I cover how to use a combination of Filter, Distinct and Sort to drill down into the Records in a table to help find the particular Record you are looking for
The best order to use these 3 functions is:
- Filter the data first to remove unnecessary records
- Use the Distinct function to remove duplications
- SortByColumns can then order the remaining records into your preferred structure
This can be represented as a nested formula with Filter at the centre and SortByColumns being the outer function: SortByColumns(Distinct(Filter())). Structuring the formula in this way has the advantage that where possible (depending on the Data Source), Power Apps will delegate the execution of the Filter operation to the Data Source, reducing the risk of a truncated data set being returned