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 / Delegation issue in th...
Power Apps
Answered

Delegation issue in the Filter function

(2) ShareShare
ReportReport
Posted on by 38
Hi,
I have a Dataverse table that contains a DateTime field. In my Power Apps application, I want to filter the data in this table by comparing the date with another date. I’m using DateValue, but it gives me a delegation warning on
DateValue( 'Séance du conseil municipal'.'Date et heure')

If I remove DateValue, the comparison doesn’t work correctly and my filter returns no results.
 
ClearCollect(
    QuestionList;
    Filter(
        'Questions des citoyens';
       DateValue( 'Séance du conseil municipal'.'Date et heure') = DateValue( seance_cm_record.'Date et heure')
       
    )
)
 
I have the same question (0)
  • Verified answer
    Haque Profile Picture
    3,653 on at
     
    DateValue() is not delegable against Dataverse. That’s why you get the warning.
     
    Instead of DateValue(), use a range filter:
    ClearCollect(
        QuestionList,
        Filter(
            'Questions des citoyens',
            'Séance du conseil municipal'.'Date et heure' >= DateValue(seance_cm_record.'Date et heure') &&
            'Séance du conseil municipal'.'Date et heure' < DateAdd(DateValue(seance_cm_record.'Date et heure'), 1, Days)
        )
    )
    
     
  • Suggested answer
    11manish Profile Picture
    3,333 on at
    you can use above suggested or below one :
     
    With(
        {
            varStart: Date(
                Year(seance_cm_record.'Date et heure'),
                Month(seance_cm_record.'Date et heure'),
                Day(seance_cm_record.'Date et heure')
            )
        },
        ClearCollect(
            QuestionList,
            Filter(
                'Questions des citoyens',
                'Séance du conseil municipal'.'Date et heure' >= varStart &&
                'Séance du conseil municipal'.'Date et heure' < DateAdd(varStart, 1, Days)
            )
        )
    )
  • Verified answer
    WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    What you have not clarified is exactly what seance_cm_record.'Date et heure' is. If a calculated date, then the previous responses will probably cover this. If it is a date field in another Table, you need
    ClearCollect(
       QuestionList;
       Filter(
          'Questions des citoyens';
         'Séance du conseil municipal'.'Date et heure' in seance_cm_record.'Date et heure'
       )
    )
    Please ✅ Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
  • khedidja90 Profile Picture
    38 on at
    The proposed solution is correct, but I have a problem when the date has this format: March 1st 2026 at 00:00. In that case it doesn’t work; it only works when the date is, for example, March 1st 2026 at 19:00. If the time is 00:00, it becomes problematic.
  • WarrenBelz Profile Picture
    155,838 Most Valuable Professional on at
    That will always be a problem as if you try to compare two date/time values with each other they have to be exactly equal down to fractions of a second. Unfortunatley (as you have discovered) Dataverse will not Delegate conversion of the format of dates within a query (so you cannot ask it to convert the value to date only inside a Filter).
     
    A couple of options if you want a Delegable query here is to either make the fields date-only or get a smaller dataset by pre-filtering with a Delegable query - see this blog of mine - although looking at this again, you seem to have three data source names 'Questions des citoyens',  'Séance du conseil municipal' and seance_cm_record, so can you please outline your structure.
     
    Please ✅ Does this answer your question 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 answering Yes to Was this reply helpful? or give it a Like ♥
    Visit my blog
    Practical Power Apps    LinkedIn  
     
     
     

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard