cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
PatD655
New Member

MS Flow - Counting total entries in the last 24 hours

Hi, 

 

I would like to create a flow that will count the total entries recorded in a SharePoint list in the last 24 hours. I would need this to be done everyday. For example: Today is Thursday June 24th, I would like to the flow to count the total received entries on Wednesday June 23. 

Thanks for your help. 

1 ACCEPTED SOLUTION

Accepted Solutions

Anytime. 

Consider marking the thread as solved to help others find it more quickly.

View solution in original post

9 REPLIES 9
AnthonyAmador
Community Support
Community Support

Hi @PatD655 

 

I think something like this can work 

AnthonyAmador_0-1624552117907.png

length(body('Get_items')?['value'])

AnthonyAmador_1-1624552178206.png

sub(length(body('Get_items_2')?['value']),length(body('Get_items')?['value']))

AnthonyAmador_2-1624552250902.png

 

That's it, just remember to change the Pagination configuration in the "Get items" action settings.

AnthonyAmador_3-1624552443168.png

Let me know if that helps. 

Cheers.

I just notice that the first compose is not necessary, I was using it for the first test. lol.

Let me know what you think.

Hi @AnthonyAmador ,

 

Thanks so much. 

I'm getting warning saying to use OData filter. I tested the flow, but it's taking time to run.

Any help with this?

 

Thanks so much!

The delay time I put it at 23 hours, because you say you need it every day, that's probably why is taking time, but if you want to test how it works, change the delay to 1 minute and add items to the list in that time.

 

The warning its for performance improvement in this case you can ignore it, but if you want to know how to use the OData filter, check this blog.

 

Hope this helps. 

Cheers.

Hi @AnthonyAmador ,

 

Thanks so much! Looks functional. I will let it run for couple days. 

Thanks again. 

Anytime. 

Consider marking the thread as solved to help others find it more quickly.

Hi @AnthonyAmador 

 

I've been trying the flow (set delay to 1min), but for some reasons I get the same value for each test. Is this okayÉ

Hi 

You know how many items do you have on the list?

Hi @AnthonyAmador 

 

I have 2000+ items, but I'm only interested in knowing how many new items were recorded in the last 24 hours. Basically I want to get total count of new items in the last 24 hours. 

 

Thanks. 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

New Ideas Forum MPA.jpg

A new place to submit your Ideas for Power Automate

Announcing a new way to share your feedback with the Power Automate Team.

MPA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

MPA Licensing.jpg

Ask your licensing questions at the Power Automate AMA!

Join Priya Kodukula and the licensing team, super users and MVPs to find answers to your questions on Power Automate licensing.

Users online (3,393)