cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Filtering a Large data table using the filter function

Hi,

 

I have a CDS data table with about 400,000 records and I'm trying to sort a single column. However, it seems even though the filter function is delegable, it cannot seem to filter this much data and either doesn't show anything or doesn't filter it at all. Any solutions?

11 REPLIES 11
Highlighted
Impactful Individual
Impactful Individual

Re: Filtering a Large data table using the filter function

Hi @dsipowerapps 

Could you please share a little more about your scenario?

What field are you trying to filter? What control is the filter being used on? What formula are you using now?

 

Thanks!

Highlighted
Super User
Super User

Re: Filtering a Large data table using the filter function

(deleted since SKH already responded)

Highlighted
Frequent Visitor

Re: Filtering a Large data table using the filter function

Sorry @SKH19 , should've given some more details. I have a CDS entity called APTH containing transaction history for a vendor. When the user searches the app and clicks on a vendor, then clicks the vendor history button, I want to filter the vendor history table to just the vendor they had selected. When they click this button it creates a global variable called "vendor" and sets it to VendorCardValue1 as a text data type. Then, on the vendor history screen, I set the items property on the data table to Filter(APTH, VendorCardValue1.Text = vendor). However, this either results in nothing showing up in the data table or simply just not even sorting it at all.

Highlighted
Impactful Individual
Impactful Individual

Re: Filtering a Large data table using the filter function

@dsipowerapps 

How are they getting to the details screen in the first place? Are they selecting that vendor from a gallery? If so, you can skip the variable and just set your Items property of the data table to Gallery1.Selected.Name (or whatever your gallery name and the company name on your entity are). Then your History button could just navigate to this data table. Then add a back button on the data table screen to go back to the gallery.

 

---
Please hit the "Accept as Solution" button if my post answered your question! If my post was helpful please consider giving it a "Thumbs Up."

Highlighted
Frequent Visitor

Re: Filtering a Large data table using the filter function

@SKH19 

Yes from a gallery that's connected to a separate entity called APVM, this entity contains the vendor and vendor details. The APTH entity is the transaction history for each of those vendors which is connected to the data table. I got rid of the variable and changed the Items property to "Filter(APTH, APVMBrowseGallery.Selected.Vendor = APTHDataTable.Selected.Vendor)." However, even though this does not give any errors, it simply will not render any of the filter data and returned "We didn't find any data to show at this time."

Highlighted
Impactful Individual
Impactful Individual

Re: Filtering a Large data table using the filter function

Try:

Filter(APTH, Vendor = APVMBrowseGallery.Selected.Vendor)

 

Highlighted
Frequent Visitor

Re: Filtering a Large data table using the filter function

Still left me with the same result. I'm almost sure it has to do with the size of the table, because before I was working with a temp APTH that contained a small portion of the whole data set and it had sorted fine. But after I had imported all of the data it won't filter it at all.

Highlighted
Impactful Individual
Impactful Individual

Re: Filtering a Large data table using the filter function

@mdevaney  Any ideas? I don't have an entity with 400k records to test anything out.

Highlighted
Super User
Super User

Re: Filtering a Large data table using the filter function

@SKH19
Neither do I... wish I could help to test here too...

Helpful resources

Announcements
secondImage

New Return to Workplace

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

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
Top Kudoed Authors
Users online (7,265)