Hi @Gorilla_8 ,
Based on the formula that you mentioned, I think you have some misunderstanding with the Sort formula. The second argument of the Sort function is required to provide a formula which would be calculated into a single one value, but the Filter formula you provided returned is a Table value.
Normally, the second argument of the Sort function is used to reference a column from your data source as Sort column. So please modify your formula as below:
If(
varUser.Email = "erica.dias@arapyauinstituto.onmicrosoft.com";
Sort(
Filter(
Despesas;
Solicitante = TextInput1.Text || 'Status de pagamento'.Value = DropDown1_2.Selected.Value || ID = DropDown1_1.Selected.ID
);
Created; // Reference column name from your Despesas data source here
Descending
);
Sort(
Filter(
Despesas;
'Status de pagamento'.Value = DropDown1_2.Selected.Value || ID = DropDown1_1.Selected.ID;
CreatorEmail = varUser.Email
);
Created; // Reference column name from your Despesas data source here
Descending
)
)
Note: The second argument of the Sort function is required to provide a formula which would be calculated into a single value rather than table value.
For your first formula you mentioned, you have missed the second argument in your Sort function. For your second formula, you have some misunderstanding on which value should be typed as the second argument in the Sort function. Hope above explanation could help in your scenario.
Please check the sample of Sort function in the following article for more details:
https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-sort#examples
Best regards,