cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper II
Helper II

Comparing date to today

I'm trying to filter a table based on the date being after today and a simple status field, but I'm having trouble.

 

ClearCollect(
    colAll, 
    Filter('[table]',end_date>Today(),status="A"  ));

end_date is a date field. If I remove the date comparison, it works, but with the date comparison, I get an emply collection. If I do it manually in Power BI, I can see about 500 filtered records. Is the comparison more complicated than this?

 

Thanks!

3 REPLIES 3
Highlighted
Community Support
Community Support

Re: Comparing date to today

Hi @kman42 ,

I've made a test but not met the problem as your description.

Could you tell me 

1)what's your data source?

2)what's status's data type?

What's more, the formula"Filter('[table]',end_date>Today(),status="A" )" is eqal to:

  Filter('[table]',end_date>Today() && status="A" )

Please check whether there's item that meet the two requirements.

 

 

Best regards,

Community Support Team _ Phoebe Liu

 

Community Support Team _ Phoebe Liu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Super User
Super User

Re: Comparing date to today

Hi @kman42 

Just to expand on what @v-yutliu-msft says, the data source that you're using plays an important part.

With SharePoint for example, filtering a date field with the > operator results in a non-delegable query. This means that if your source data contains more than the 2000 records (as defined in the non-delegable query limit in the settings of your app), the Filter function may not return accurate results.

If you let us know what data source you're using, we can advise further.

Community Champion
Community Champion

Re: Comparing date to today

Hi @kman42 how are you progressing with this? Can you review the above replies? 

 

Thank you,

 

@TopShelf-MSFT 

Helpful resources

Announcements
August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!

secondImage

Return to Workplace

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

secondImage

Super Users Coming in August

We are excited for the next Super User season.

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,775)