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

Sharepoint List - Filter for present day

Hi,

 

I am trying to create an application that Counts rows after filtering - the forumla I have at the moment is the following:

 

CountRows(Filter('Lunch Ordering',Meal_x0020_Type.Value="Main Meal"))

 

This returns a value however it returns all items in the list, I would only like it to count Items created on the present day.

 

Can anyone please give me any idea what formula I can add to filter items created on the present day?

 

Thanks

 

 

 

5 REPLIES 5
Highlighted
Helper II
Helper II

Re: Sharepoint List - Filter for present day

Can anyone help with this?

Highlighted
Helper I
Helper I

Re: Sharepoint List - Filter for present day

Hi ,

Try this code:

CountRows(Filter('Lunch Ordering',Meal_x0020_Type.Value="Main Meal"; DateValue(Text(Today()))=DateValue(Text(Created))))

Created is one of Sharepoint omitted columns.

Best regards,
Rui Barbosa
Highlighted
Helper II
Helper II

Re: Sharepoint List - Filter for present day

Hi,

 

Thank you very much for getting back to me.

 

The solution that you sent dosen't throw up any errors - however, it dosen't return any results not even a '0' result

 

Do you have any other suggestions?

 

Thanks again

Highlighted
Community Support
Community Support

Re: Sharepoint List - Filter for present day

Hi SChappell2580,

 

Please try if this function works for you:
CountRows(Filter(NewList,choice.Value="test1"||DateValue(Text(Today(),"[$-en-US]en-US"))=DateValue(Text(Created),"en-US")))

 

About DateValue function, please see details in this documentation:
https://powerapps.microsoft.com/en-us/tutorials/function-datevalue-timevalue/


Best regards,
Mabel Mao

Community Support Team _ Mabel Mao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Highlighted
Helper II
Helper II

Re: Sharepoint List - Filter for present day

Hi Mabel,

 

Thanks for your response

 

This returns a number however it appears to be counting all rows for any created date as opposed to counting rows only created today.

 

Do you have any idea why this would be?

 

Regards

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

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

Top Solution Authors
Top Kudoed Authors
Users online (6,947)