cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Power Participant
Power Participant

Distinct filter from sharepoint list

Hi

Im trying to filter value to be displayed in a dropdown box.

I want to filter from a SharePoint list and this works fine.

 

Distinct(Filter(AssetListData;Title=ItemData.SelectedText.Value);Vendor)

Example above i filter from list displays Vendors based on Title

Now i want to Filter Model based on Vendor and Title.

 

Currently my filter for the Model field looks like this.

Distinct(Filter(AssetListData;Vendor=VendorData.SelectedText.Value);Model)

With the above i will get all results that matches the Vendor but i want it to distinct not only vendor but also Title.

 

If the a Vendor for example Microsoft has 500 models then all is showend. But i want to filter like this.

If Title is = TV and Vendor is Microsoft show only models that are TV and Vendor Microsoft.

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Power Participant
Power Participant

Re: Distinct filter from sharepoint list

@Drrickryp 

 

Filter(DataSource,Title=ItemData.SelectedText.Value && Vendor=VendorData.SelectedText.Value)

The above seems to work without any delegation warnings.

View solution in original post

3 REPLIES 3
Highlighted
Super User
Super User

Re: Distinct filter from sharepoint list

Hi @JimmyWork 

As you are aware, Distinct() can only create a single column table.  However, you can use the GroupBy() function to accomplish your goal. see https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-groupby  This function can use multiple columns to group the data and you can then filter it on those columns.  You can reshape the data in the other columns by using the shaping functions to only show the other columns that you are interested in.  see https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-table-shaping.  Be aware that these functions are not delegatable in SharePoint so if you have a large list, the resulting tables may not be complete. 

Highlighted
Power Participant
Power Participant

Re: Distinct filter from sharepoint list

@Drrickryp Thank you

 

Im trying to create a cascading dropdown using the filter. How can we work around the delegate for large list?

 

Highlighted
Power Participant
Power Participant

Re: Distinct filter from sharepoint list

@Drrickryp 

 

Filter(DataSource,Title=ItemData.SelectedText.Value && Vendor=VendorData.SelectedText.Value)

The above seems to work without any delegation warnings.

View solution in original post

Helpful resources

Announcements
secondImage

New Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.

August 2020 CYST Challenge

Check out the winners of the recent 'Can You Solve These?' community challenge!

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Check this Out

Helpful information

Featuring samples like Return to the Workplace and Emergency Response Applications

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Users online (4,413)