@joel914823 - The SortByColumns function runs on string data types, and Power Apps considers a SharePoint Yes/No field as a complex data type.
To complicate matters a little, the Yes/No data type returns a Boolean (true/false).
You will need to leverage the AddColumns function to create another "virtual" column which returns string "Yes" for true and string "No" for false, and then sort on that column.
Assuming all of this is related to your other post, use:
With(
{
_prefiltered_data: Filter(
'eCom Intake',
Status.Value = "Open - Assigned",
Len(Dropdown4.Selected.Value) = 0 || LOB.Value = Dropdown4.Selected.Value,
Len(Dropdown4_1.Selected.Value) = 0 || 'Issue Type'.Value = Dropdown4_1.Selected.Value,
!Checkbox1.Value || 'Created By'.Email = User().Email
)
},
With(
{
_transformed_data: AddColumns(
_prefiltered_data,
TextID,
Text(ID),
CreatedByDisplayName,
'Created By'.DisplayName,
AssignedToDisplayName,
AssignedTo.DisplayName,
YesNoAsText,
If(
'Your Yes/No Field',
"Yes",
"No"
)
)
},
With(
{
_filtered_by_names: Search(
_transformed_data,
SearchInput_tb.Text,
Title,
CreatedByDisplayName,
AssignedToDisplayName
),
_filtered_by_id: Search(
_transformed_data,
SearchInput_tb.Text,
TextID
)
},
With(
{
_finaltable: If(
!SearchID_tg.Checked && !SearchRequestor_tg.Checked,
_filtered_by_names,
_filtered_by_id
)
},
SortByColumns(
_finaltable,
"YesNoAsText",
SortOrder.Descending,
"ID",
SortOrder.Ascending
)
)
)
)
)