I have a canvas app where data source is Dataverse. Screen in app shows gallery connected to a list containing Products. Each product has a category field and an item description field. On this screen, I want the gallery to show a distinct list of categories and then we'll click into the category to see its items.
The actual categories displayed have some additional conditional logic based on the products themselves (such as quantity in stock), therefore I cannot point this gallery directly to the choices source for the product category.
I know Delegate is one of the functions that won't throw a warning but is not delegable, so
Distinct(Purchases, Category)
won't scale. Does anyone have any other ways to get a distinct value set? Not seeing any options within the Dataverse view and with scalability being the main goal I would like to avoid caching data onstart.