Hi friends.
I can get each of these to work individually in the items setting of my gallery, however I am having trouble when trying to nest them.
This works to SORT on the gallery but not filter:
SortByColumns(
AddColumns(
ReportDeliveryCustomerGroups,
"MainCustomerName",
'Main Customer Name'.Value
),
"MainCustomerName",If(SortDescending2,Descending,Ascending)
)
This works to FILTER on the gallery but not sort:
If(
IsBlank(CustomerCombobox_2.Selected.Value),
ReportDeliveryCustomerGroups,
Filter(
ReportDeliveryCustomerGroups,
Customer.Value = CustomerCombobox_2.Selected.Value
)
)
The closest I can come to not getting angry red lines everywhere is this:
SortByColumns(
If(
IsBlank(CustomerCombobox_2.Selected.Value),
ReportDeliveryCustomerGroups,
Filter(
ReportDeliveryCustomerGroups,
Customer.Value = CustomerCombobox_2.Selected.Value)
),
AddColumns(
ReportDeliveryCustomerGroups,
"MainCustomerName",
'Main Customer Name'.Value
)
"MainCustomerName"
)
but it's just not working. I've been putting commas and parentheses in different spots and I'm just going in circles. Please help me fix this silly thing.

Thank you!!
C