cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
wi11iamr
Advocate II
Advocate II

Filter on Choices in ComboBox

I have a Sharepoint list in excess of 5,000 records. Within these records I have a [Store] column for which I'd like to get the distinct list for use in a Combo Box.

 

I tried filtering as below, but get the error "Invalid Schema, expected a one-column table"

 

 

Filter(
   'Merchandiser Inspection',
   Store_DataCard1.DataField in Store_1
 )

 

 

 

As a test, I tried wrapping my Choices function in a Distinct function (see code below), but that hasn't worked as it still tries to fetch all 5000+ records.

 

 

Distinct(
    Choices('Merchandiser Inspection'.Store),
    Store_1
  )

 

 

 

I've read a few other such issues on how to resolve this, but I cannot relate any to my scenario. I've got to think it's a simple answer - any help/pointers appreciated.

4 REPLIES 4
Eelman
Super User
Super User

@wi11iamr 

Your simplest solution would be to create a separate list which holds these distinct values and use that for your dropdown.

 

The in operator and Distinct function aren't delegateable and will run into delegation and/or data row limit issues.

MarvinBangert
Continued Contributor
Continued Contributor

Hey @wi11iamr 

I made a test on my side and created a SharePoint list with more than 5.000 records and a choice column "Store". When I add the following formula to my combobox, it works as expected.

Choices(Merch.Store).Value

Merch is the list name. Because it is a choice field, you need to wrap them in a "Choice" function and display the value by ".value". Even with this I just receive only my 8 different choices from the list. You could also add the "Distinct" function:

Distinct(Choices(Merch.Store).Value;Value)

 

Otherwise: What kind of column type is your store column and about how many distinct elements should be in your combobox? Maybe a screenshot would also help to understand.

 

Best regards
Marvin

If you like this post, give a Thumbs up. If it solved your request, Mark it as a Solution to enable other users to find it.

@wi11iamr 

Just checking in to see if you managed to get a solution? If not, either myself or @MarvinBangert would be happy to help you further.

 

Cheers

Thanks @Eelman and @MarvinBangert , I've not got it quite sorted and need to find some quiet time to work through/with the examples you've given. Just wrapping up some start-of-week urgencies and hope to get back to this later in the week. I'll keep you posted - thanks again for the feedback and suggestions so far.

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Users online (2,800)