I've been trying to get this sorted using several posts from the web but I'm still having problems with this.
The problem is very simple. I have a list in which one of column called SupplierCategory is configure as a "Choice" field. I've created a new Canvas App and now I want to sort a Gallery using a dropdown based on this Choice field. I've followed this article:
How to Filter Power Apps Gallery By Dropdown? - SharePoint Dot Net
So far I've done the following:
Under the OnVisible option for the screen I've created a collection to add the "All" option:
ClearCollect(
colProjects,
{Value:"All"}
);
Collect(
colProjects,
Distinct(
Choices('Suppliers Master List'.SupplierCategory),Value)
)
This works fine and my dropdown now has all the options from the SupplierCategory column plus All.

The dropdown (DropDownCat) items is configured with the collection name colProjects.
When I try to apply the filter on the gallery, I'm using the following:
If (
DropDownCat.Selected.Value = "All",
'Suppliers Master List',
Filter('Suppliers Master List',
SupplierCategory.Value=DropDownCat.Selected.Value
)
)
It keeps throwing out an error related to incompatibility with the types used for comparison:

Any help would be greatly appreciated.