As @v-monli-msft mentioned, you can use the Distinct function to retrieve the unique value of the task/project combination. This function, however, will generate a table with a single row, so if combining the values is something that works for your scenario, then that would be the best choice:
Distinct(DataSource, Task & "-" & "Project)
That will give you a list (table) with one column, and the value is the concatenation of the task and the project, separated by a " - ".
If, however, you still need to maintain the two columns (Task and Project) separated, and possibly use the values from other columns in the data source, you can use the GroupBy function to do that. For example, if you have the data source with the following values:
Task Project Value
T123 P02 1
T999 P02 2
T123 P02 3
T123 P04 4
T873 P07 5
T123 P02 6
You can use the formula below to select only the distinct values of the task/project combination, and the first of the values of each:
AddColumns(
GroupBy(coll, "Project", "Task", "ProjectAndTask"),
"FirstValue",
First(ProjectAndTask).Value)
Hope this helps!