web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Creating collection us...
Power Apps
Answered

Creating collection using Filter with two columns - Results returned are wrong?

(0) ShareShare
ReportReport
Posted on by

Hello!

 

I have been building an app and I've just hit an issue with the max collection size of 500 items.  So to reduce the collection size I am creating it with FILTER to allow me to reduce the 100's of items to a few.  The app is using SharePoint as a data source.  When I filter on a single item, be that either text column or Yes/No it returns the correct result.  When I try and filter by two columns I get completely the wrong information. 

 

Employee = Text Column

IsCurrentItem = Yes/No Column

 

Filter.jpg

 

The result should be just one item returned with the IsCurrentItem column set to True.  There are a total of 6 items in the list I am testing against, so the count of 5 in the screenshot shows that it's not including the item with the IsCurrentItem set to True.  If I change the formula and exclude either of the columns it returns the right result.  Is there some special magic with AND when using with FILTER?  This one has me scratching my head!

 

Any help gratefully received.

Rob

 

Categories:
I have the same question (0)
  • Ethan_009 Profile Picture
    4,838 Moderator on at

    Hi @Rob_CTL ,

     

    Can you try this and let me know if the formula works as intended.

    ClearCollect(
    	colGetLastMileageNew,
    	Filter(
    		'Mileage Record',
    		( IsBlank(Employee.Text) || Employee.Text = "SharePoint Automation")
    		||
    		( IsBlank(IsCurrentItem) || IsCurrentItem = true)
    	)
    )
    

     

    Hope this helps

     

  • Rob_CTL Profile Picture
    on at

    Hi @Ethan_R 


    Thanks for the formula, the result was a bit random, it brought back a number of other items that had the IsCurrentItem as True, it didn't filter on the Employee name at all.  And even more confusing it also brought back the same records as my screenshot above where the IsCurrentItem is false.  Ok, I am now officially very confused! 🙂

     

    Rob

     

     

  • Rob_CTL Profile Picture
    on at

    Quick update: It is something to do with the Yes/No (boolean), if I change this to a Text column the filtering against both column works as expected.  I'd still like to understand if this is a limitation or some other randomness so if anyone has any input?

     

  • Verified answer
    Community Power Platform Member Profile Picture
    Microsoft Employee on at

    Hi @Rob_CTL,

    Try the below formula and let me know the output;

    ClearCollect(
    	colGetLastMileageNew,
    	Filter(
    		'Mileage Record',
    		Employee.Text = "SharePoint Automation",IsCurrentItem = true
    	)
    )

     

  • Rob_CTL Profile Picture
    on at

    @Anonymous we have a winner! 🙂  so it looks like the And was causing the issue, thanks for the help on this, this one is going in the knowledgebase.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard