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 / filtering a collection...
Power Apps
Answered

filtering a collection on an empty date impossible

(0) ShareShare
ReportReport
Posted on by 711

I have loaded some records based on a search name into a collection and let this be the items of a gallery.

 

ClearCollect(ZoekDieren;SortByColumns(Filter('[dbo].[dier]_1';naam = eZoekTekst.Text);"identificatie_nummer_asiel";Descending))

This goes fine.

Now I want to filter this collection further by looking up a date in another tasble and only show when this dat is empty:

 

ClearCollect(ZoekDieren;Filter(ZoekDieren;Day(LookUp('[dbo].[asiel_verblijf]';dier_id=dier_id;vertrek_datum))=0))

The name dier_id is the same for the table from the first code (and thus the collection) and fot the target table '[dbo].[asiel_verblijf]', that is way dier_id=dier_id.

Should I disambiguate this and how?
Setting the filter to isblank(vertrek_datum) of vertrek_datum=0 doesn't help at all.

If I say vertrek_datum>0 I get all records so there is not some deep fundamental flaw to the approach I would say.

 

Working with values being blank and especially dates is a real pita in powerapps imho. Costs a lot of time. 

Categories:
I have the same question (0)
  • yashag2255 Profile Picture
    24,769 Super User 2024 Season 1 on at

    @HansHeintz 

     

    Can you try to modify your expression as:
     
    ClearCollect(ZoekDieren;Filter(ZoekDieren;!IsBlank(LookUp('[dbo].[asiel_verblijf]';dier_id=dier_id;vertrek_datum)))
    Hope this Helps!
     
    If this reply has answered your question or solved your issue, please mark this question as answered. Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up. THANKS!
  • Verified answer
    v-xida-msft Profile Picture
    Microsoft Employee on at

    Hi @HansHeintz ,

    Could you please share a bit more about the "vertrek_datum" column in your '[dbo].[asiel_verblijf]' table? Is it a Date time type column?

     

    Based on the formula that you mentioned, I think there is something wrong with it. I have made a test on my side, please consider take a try with the following workaround:

    Please consider modify your formula as below:

     

    ClearCollect(
    ZoekDieren;
    Filter(
    ZoekDieren;
    dier_id in Filter('[dbo].[asiel_verblijf]'; IsBlank(vertrek_datum)).dier_id
    )
    )

     

    Or

     

    ClearCollect(
    ZoekDieren;
    Filter(ZoekDieren; IsBlank(LookUp('[dbo].[asiel_verblijf]'; dier_id = ZoekDieren[@dier_id]; vertrek_datum)))
    )

     

     

    In addition, if the "vertrek_datum" column is a Date time volumn in your '[dbo].[asiel_verblijf]' table, I agree with your thought almost, please consider use Disambiguate operator within your formula. Please modify your formula as below:

    ClearCollect(
    ZoekDieren;
    Filter(
    ZoekDieren;
    Day(LookUp('[dbo].[asiel_verblijf]'; dier_id = ZoekDieren[@dier_id]; vertrek_datum)) = 0
    )
    )

    Please consider take a try with above solution, then check if the issue is solved.

     

    Best regards,

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 July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 427 Most Valuable Professional

#2
11manish Profile Picture

11manish 201 Super User 2026 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 128 Super User 2026 Season 2

Last 30 days Overall leaderboard