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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Filter() function not ...
Power Apps
Answered

Filter() function not returning all rows

(0) ShareShare
ReportReport
Posted on by 6

I have the following Problem:

 

I want to filter a list of Events that happened with a car eg "accident" "driver change" and so on.

 

but when i filter the list to put the results in a gallery with:

 

Filter(Event_Database; LicensePlate = varCar.LicensePlate)

 

I get incomplete results. Some rows are there some are not.

 

varCar is one Item of my car List that got selected before.

The column LicensePlate in the Event_Database is a Lookup on the Car List so there should not be any Typos.

 

the list has 429 Items right now so this should not be a delegation problem.

 

I tried to load the whole list into a local variable and still have the same problem.

 

ClearCollect(varEventList; Event_Database)

 

 

somebody has a hint for me why Filter() is not giving me the rows even if i try it local?

 

The items are on the list I checked also the local collection by just doing:

 

Last(varEventList)

 

And the last item shows up with no problems.

 

I drives me crazy that some rows are given back but others not.

 

Thank you for your Help

Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    Hi @MattHamm ,

    Are you saying 'Licence Plate' is a Lookup column? Please confirm before I comment further as if so, this is the source of your problem.

  • MattHamm Profile Picture
    6 on at

    yes LicensePlate is a lookup column in my Event_Database List looking up in the car list.

  • Verified answer
    WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    @MattHamm ,

    All your problems will go away if this was a simple Text field - firstly ask yourself why you need the Lookup column - I have a blog that may assist.

    However dealing with your question, I am assuming varCar is simply set on an item selected in a gallery, in which case you would need something like

    With(
     {wList:Event_Database);
     Filter(
     AddColumns( 
     Event_Database; 
     "Licence";
     LicensePlate.Value 
     );
     Licence = varCar.LicensePlate.Value
     )
    )

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

  • MattHamm Profile Picture
    6 on at

    So you say I should add a new simple Text Column to my List that is basically a copy of the lookup field to use it for the Filter() function?

    Did I understand that correctly?

     

    I can try that. I hope that will not create a lot of overhead.

     

    The lookup fields are just super convenient when working in the Lists directly.

    In Powerapps I would actually not need them.

     

    maybe i can concider a flow that just adds a copy of the lookup LicencePlate (thank you for correcting my spelling there by the way. I am not native in english) in a simple text everytime a new item is created.

     

    I will try out that solution and come back to you.

    Thank You

  • WarrenBelz Profile Picture
    153,073 Most Valuable Professional on at

    Hi @MattHamm ,

    If you really need the Lookup field, then you have to use it (the text column I suggested was replacing it) - bear in mind that you can also create integrated forms in SharePoint to do the lookup (I have not used lookup columns for many years). They will cause you many problems in power apps including reading and writing from, filtering and sorting.

    Did you try the code I sent?

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard